且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何设置使用plot()标记x轴的方式?

更新时间:2023-11-22 08:38:40

我想您首先要使用xaxt ="n"选项取消x轴上的标签:

I think you want to first suppress the labels on the x axis with the xaxt="n" option:

plot(flow~factor(month),xlab="Month",ylab="Total Flow per Month",ylim=c(0,55000), xaxt="n")  

然后使用axis命令添加您自己的标签.此示例假定标签位于名为month.name

then use the axis command to add in your own labels. This example assumes the labels are in an object called month.name

axis(1, at=1:12, labels=month.name) 

我必须查找如何执行此操作,并且

I had to look up how to do this and I stole the example from here.