I have intraday data with a structure of the data something like this:
Time Value
14:00:00 4
15:00:00 5
16:00:00 4
17:00:00 5
18:00:00 2
08:00:00 7
09:00:00 4
10:00:00 4
When I want to plot it, I use this ggplot
command:
ggplot(data , aes(x=Date)) +
geom_line(aes(y = Value)) +
scale_x_datetime()
However, ggplot
somehow still plots my missing time on the x-axis, and also extrapolate the values.
How can I tell ggplot
to just skip this part of the plot? Or which package is capable of doing so?