1.title# 可以单独使用,有时候绘图函数里已经包含了。
attach(iris)# 这样就不用每个都写iris了。
boxplot(Sepal.Length~Species,col=heat.colors(3),
main=list("Sepal.Length按照Species分类的箱线图",font=4,col='red',cex=1.5),
sub=list("数据来源,iris数据集",font=3,col="green",cex=0.8),
xlab="Species",ylab="Sepal.Length")
上面是没单独用title做,如果刚开始图形较为简单,可以加上title。
boxplot(Sepal.Width~Species,col=heat.colors(3))# ”'