How do you draw a boxplot without specifying x axis?

后端 未结 3 1293
无人及你
无人及你 2020-12-19 03:26

The base graphics can nicely plot a boxplot using a simple command

data(mtcars)
boxplot(mtcars$mpg)

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 04:08

    You can also use latticeExtra, to mix boxplot syntax and ggplot2-like theme:

    bwplot(~mpg,data =mtcars,
            par.settings = ggplot2like(),axis=axis.grid)
    

    enter image description here

提交回复
热议问题