How to remove default axis from the plot produced by boxplot()?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 15:21:51

You mean like this?

 d <- data.frame(x = 2, y=1:5) 
 boxplot(d)
 boxplot(d, axes=FALSE) # add axes=FALSE to remove axes

you can then add axes however you please:

e.g.

 d <- data.frame(x = 2, y=1:5) 
 boxplot(d, axes=FALSE)
 axis(2, at=1:5, labels=c(rep("whatever I want",5)))

EDIT as per your comment:

remove default labels:

 boxplot(d, xaxt="n")
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!