0
A
回答
1
指定year
作爲日期,使用as.Date
。這裏有一種方法,使用seq.Date
:
year=seq(as.Date("2005/01/01"), by="1 year", length.out=3)
dat=c(1,2,3)
plot(year,dat)
0
3種可能的方式:
與
xaxp
控制標籤分辨率:plot(year,dat,xaxp=c(range(year),2))
使用對於x軸的
Date
對象:year2 <- as.Date(paste(year,"-01-01",sep=""))
plot(year2,dat)
構建軸自己:
plot(year,dat,xaxt="n")
axis(1,at=year)
相關問題
- 1. 擺脫Java中的小數位?
- 2. 如何擺脫長卷軸RecyclerView
- 3. Mac OS X上的Clozure CL:擺脫GUI?
- 4. 的emacs擺脫C-X
- 5. 擺脫圖1:位
- 6. 相對位置,如何擺脫死角?
- 7. dygraphs - 爲「sparkline」式圖表擺脫黑色x和y軸?
- 8. Yii2:如果數值是整數,如何擺脫小數(分)?
- 9. 如何擺脫PlaceHistoryMapper
- 10. 如何擺脫TLE?
- 11. 如何擺脫aspx.designer.cs?
- 12. 如何擺脫libthread_db
- 13. 動態添加系列,如何擺脫默認的y軸?
- 14. 如何擺脫gnuplot的x2&y2座標軸?
- 15. 如何擺脫與CSS線圖的軸線?
- 16. 如何擺脫舊的Localizable.strings?
- 17. 擺脫字符串中的\ x ##(Python)
- 18. 如何擺脫COM上下文錯誤
- 19. TextBox:如何擺脫行數的限制?
- 20. 如何更改ggplot2中軸標籤上的小數位數?
- 21. 擺脫NSTouchBar上的圖標
- 22. 我如何擺脫循環
- 23. 我如何擺脫點!
- 24. 如何擺脫 - openssl錯誤
- 25. 如何擺脫NetBeans java.io.FileNotFoundException?
- 26. 如何擺脫這一行?
- 27. 如何擺脫黑屏
- 28. 我如何擺脫「MySQLSyntaxErrorException」
- 29. 如何擺脫使用python
- 30. 如何擺脫RVM通知