Class 4 - Pie, Barplot
Class 4 - Pie, Barplot
> colors
> percentage
[1] 26 24 16 16 6 5 4 3
colors percentage
> percentage
26 24 16 16 6 5 4 3
> percentage
26 24 16 16 6 5 4 3
> pie (percentage, label = colors, col = carcol, main= "Pie chart of Auto Color Prefrence")
>
> lbl
[1] "Silver 26 %" "Black 24 %" "White 16 %" "Grey 16 %" "Red 6 %"
> pie (percentage, label = lbl, col = carcol, main= "Pie chart of Auto Color Prefrence")
> pie3D (percentage, labels = lbl, col = carcol, main= "Pie chart of Auto Color Prefrence")
> pie3D (percentage, labels = lbl, col = carcol, explode= 0.1, main= "Pie chart of Auto Color Prefrence")
> pie3D (percentage,col = carcol, explode= 0.1, main= "Pie chart of Auto Color Prefrence")
> lbl
[1] "Silver 26 %" "Black 24 %" "White 16 %" "Grey 16 %" "Red 6 %"
> dev.off
if (which == 1)
.External(C_devoff, as.integer(which))
dev.cur()
<bytecode: 0x04e2e4c0>
<environment: namespace:grDevices>
> dev.off ()
null device
> pie3D (percentage,col = carcol, explode= 0.1, main= "Pie chart of Auto Color Prefrence")
BARPLOT
> barplot (percentage, col= carcol, main = "bar graph")
> dev.off()
null device
> barplot (percentage, col= carcol, main = "bar graph", horiz = TRUE)
> dev.off()
null device
> barplot (percentage, col= carcol, main = "bar graph", horiz = TRUE, names.arg = colors)
> dev.off()
null device
> barplot (percentage, col= carcol, main = "bar graph", horiz = TRUE, names.arg = colors, las =1)
> dev.off()
null device
1
> barplot (percentage, col= carcol, main = "bar graph", horiz = TRUE, names.arg = colors, las =1, xlab
="percentage", ylab= "colors")
> barplot (percentage, col= carcol, main = "bar graph", horiz = TRUE, names.arg = colors, las =1, xlab
="percentage", ylab= "colors", density = 50, border = "darkblue")
barplot (percentage, col= carcol, main = "bar graph", horiz = TRUE, names.arg = colors, las =1, xlab
="percentage", ylab= "colors", density = c(5,10,15,20,30,7), border = "darkblue")