X axis in Barplot in R

后端 未结 1 1733
伪装坚强ぢ
伪装坚强ぢ 2021-02-08 09:04

I want to ask a question about barplot\'s axes:

first please see my data.

SerNo   DOY Rain
1   350 0
2   351 0
3   352 0
4   353 0
5   354 0
6   355 0
7         


        
相关标签:
1条回答
  • 2021-02-08 09:38

    Try this instead:

    mp <- barplot(rainbar$Rain,axes=F,ylim=c(0,15))
    axis(1,at=mp,labels=rainbar$DOY)
    axis(2,seq(0,15,3),c(0,3,6,9,12,15))
    

    Read ?barplot to see that the value returned from the function call is a vector of midpoints in the plot coordinate system.

    0 讨论(0)
提交回复
热议问题