我想创建这样的箱线图: 这个图是由lattice包中的bwplot函数创建的。我希望使用boxplot函数来绘制类似的图形。 我注意到在boxplot函数中,我们只能更改箱体的填充色,如何通过boxplot函数更改箱体边界颜色呢?谢谢!
查看?boxplot,你会发现有一个参数border=可以实现你想要的效果。例如:boxplot(count ~ spray, data = InsectSprays, col = "lightgray", border=c("blue", "green", "blue", "green", "blue", "green"))