常用的图形,这里给出案例:
barplot
条形图、单向量条形图
> attach(mtcars)
The following object is masked from package:ggplot2...plot(factor(cyl,levels = c(6,4,8)))
?...col=c("red","yellow","green"))
?...饼图
par(mfrow=c(2,2))
slices = c(10,12.4,16,8)
labels = c("1","2","3","4")
pie(slices,labels)
?...cyl.f = factor(cyl,levels=c(4,6,8))
am.f = factor(am,levels=c(0,1),labels=c("auto","stand"))
boxplot