基础图形可以使用简单的命令绘制出一个漂亮的箱线图。
data(mtcars)
boxplot(mtcars$mpg)
但是qplot
需要y轴。如何使用qplot
达到与基础图形boxplot相同的效果而不出现此错误?qplot(mtcars$mpg,geom='boxplot')
Error: stat_boxplot requires the following missing aesthetics: y