简体   繁体   English

调整y轴上的刻度数,R中的barplot()

[英]Adjust the number of ticks on y axis, barplot() in R

I need make few things to get more ticks on y axis, as shown in the image below, but I am not managing to do that. 我需要做一些事情来使y轴上的滴答声更多,如下图所示,但我没有设法做到这一点。 Any help will be appreciated a lot! 任何帮助将不胜感激! This far I have typed: 到目前为止,我已经输入:

Temp<-table(airquality$Temp)
barplot(Temp, col = "red", border = "blue",xpd = FALSE)

If you only want ticks and no labels, you can use axis with seq and labels=FALSE 如果只需要刻度线并且没有标签,则可以将axisseq一起使用,并且labels=FALSE

Temp<-table(airquality$Temp)
barplot(Temp, col = "red", border = "blue",xpd = FALSE)
axis(2,at=seq(range(Temp)[1],range(Temp)[2],by=1),labels=FALSE)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM