我有一组计时时间是两个时间点之间的差异。这些值的范围从略微负值到略大于1. Chron将这些值显示为天数的一小部分,因为某些值大于1.
当我在ggplot中绘制这些值时,我尝试使用scale_y_chron()
正确地注释y轴,但scale_y_chron()
似乎只在24小时内绘制时间。有没有什么方法可以将轴标注为HH:MM从00:00开始?
# data:
time_to <- c(0.19305556,0.12083333,0.58402778,0.32986111,0.40486111,
0.77083333,0.18263889,0.23472222,0.10138889,0.11666667,
0.47222222,0.14166667,0.15694444,0.24166667,0.16666667,
0.29166667,0.28194444,0.16875000,0.42777778,0.88750000,
0.17916667,0.05763889,0.53263889,0.11666667,0.22916667,
0.75069444,0.98680556,1.29930556,0.78263889,0.73611111,
0.73958333,1.22708333,0.41319444,0.98402778,1.22500000,
0.33194444,0.95972222,0.18333333,0.11458333,0.86805556)
# plot:
require(chron)
require(ggplot2)
qplot(y=time_to)
理想情况下,y轴应表示从00:00开始的总小时数,但如果时差大于24小时,则默认为天数。