I have a time-series dataset: the time is by the following format "2017/5/22 4:00". There are questions about creating graphs by ggplot2.
1- when I use ggplot+geom_line, the x labels always show by certain fixed hours: such as 2017/5/22 22:00. Is there any way to control which date + time (not 22:00) showing on x axis?
2- If I want to create my time-series data by two segment lines separated by the time, how can I achieve it?
3- how to create a text legend in a fixed position when x axis is a POSIXct variable?
if ggplox2 cannot achieve these well, is there any other package?
Thanks,
time sales
2017/5/22 4:00 10943
2017/5/21 4:00 11504
2017/5/31 4:00 11530
2017/5/25 4:00 11586
2017/5/30 4:00 11834
2017/5/28 4:00 11909
2017/5/29 4:00 11962
2017/5/23 4:00 12500
2017/5/26 4:00 13361
2017/5/27 0:00 13873
2017/5/27 4:00 14221
2017/5/23 0:00 14616
2017/5/24 0:00 15123
2017/5/25 0:00 15506
2017/5/31 0:00 15635
2017/5/30 0:00 15954
2017/5/28 0:00 15977
2017/5/26 0:00 16020
2017/5/24 4:00 16484
2017/5/21 0:00 17865
2017/5/22 0:00 18176
2017/5/29 0:00 19663
2017/5/29 20:00 82236
2017/5/27 20:00 83043
2017/5/28 20:00 85146
2017/5/29 8:00 87779
2017/5/21 8:00 88097
2017/5/29 16:00 90712
2017/5/30 20:00 93007
2017/5/21 20:00 93178
2017/5/25 20:00 95056
2017/5/26 20:00 95741
2017/5/28 16:00 96534
2017/5/30 8:00 98494
2017/5/27 16:00 100263
2017/5/24 20:00 100511
2017/5/30 16:00 100517
2017/5/28 8:00 100785
2017/5/23 20:00 101296
2017/5/26 16:00 103592
2017/5/31 20:00 103735
2017/5/25 16:00 105954
2017/5/22 20:00 106065
2017/5/30 12:00 106879
2017/5/21 16:00 108202
2017/5/29 12:00 109062
2017/5/25 8:00 110579
2017/5/28 12:00 114185
2017/5/27 8:00 116136
2017/5/21 12:00 117835
2017/5/24 8:00 117853
2017/5/26 8:00 122221
2017/5/22 8:00 122425
2017/5/23 16:00 124383
2017/5/24 16:00 127696
2017/5/26 12:00 133663
2017/5/27 12:00 134442
2017/5/23 12:00 136722
2017/5/31 8:00 140863
2017/5/23 8:00 143900
2017/5/24 12:00 145211
2017/5/31 16:00 147506
2017/5/22 16:00 150118
2017/5/31 12:00 153933
2017/5/25 12:00 154980
2017/5/22 12:00 155885