如何在R中限制直方图的x轴并放大数据?

时间:2018-10-21 05:52:07

标签: r

如何限制R中的x轴? x轴是日期,例如12月15日,12月16日,12月17日。

1 个答案:

答案 0 :(得分:0)

hist(as.Date(rnorm(10000, 18000, 300), origin='1970-01-01'), 
     breaks = 1000, 
     xlim = c(as.Date('2018-08-01'), as.Date('2018-09-01')))

enter image description here