在x轴上,我有双倍的数据时间

时间:2013-07-13 20:06:07

标签: r datetime plot format

这是我的数据集的片段:

           Date         Open     Max Min Close Volumen
1   AGORA   19990420    49.9    49.9    46.1    47.1    214339
2   AGORA   19990421    47.0    47.2    46.5    46.7    160604
3   AGORA   19990422    47.0    49.9    47.0    49.1    155640
4   AGORA   19990423    49.4    51.0    49.1    49.7    164435
5   AGORA   19990426    49.5    49.8    49.0    49.0    90323

我想用Close(y轴)和Date(x轴)制作绘图。这是我的代码:

datawykres=strptime(Data, format="%Y%m%d")[3450:3569]
plot(y=dane,x=datawykres,type="l",main="Wykres indeksu AGORA",ylab="Wartość AGORA",xlab="Data")
axis(1, Data[c(T,rep(F,20))], F)  # interwał dat do ustalenia (teraz: co 20.)
text(x=datawykres[c(T,rep(F,20))], y=par("usr")[3]*.98, labels=datawykres[c(T,rep(F,20))], 
 xpd=T, srt=45, adj=c(1,0.5))

enter image description here

我希望从(lut,mar)的波兰月份的x轴名称中删除,并像2013-01-18那样离开日期。我不知道,我怎么做。有人可以帮帮我吗?

非常感谢你:)

1 个答案:

答案 0 :(得分:0)

只需将xaxt="n"添加到你的剧情电话中。

?par   # near the bottom of the parmeter descriptions.