【发布时间】:2016-09-09 16:52:40
【问题描述】:
我在 R 中绘制时间序列数据。在 X 轴上,我应该得到 2014、2015、2016 年,而我得到的是 2014.0、2014.5、2015.0、2015.5、2016.0 和 2016.5,这很烦人.我怎样才能摆脱它?
下面是我使用的代码。
inflow<-ts(inflow,start = c(2014,1),frequency = 12)
plot(inflow, xlab="Year", ylab="Inflow Count")
谁能帮我摆脱X轴年份字段中的小数部分。我还将图像 (R Plot) 与结果输出一起附加。
【问题讨论】:
-
格式为 YYYY.M,您可能需要手动更改 x 轴标签或在此处使用一些替代功能。stackoverflow.com/questions/17758006/…
标签: r plot time-series