Forgive me if this is already answered, but I cannot find the question in the archives.
I am trying to plot some data with times on x axis. The problem is that it plots the times with an extra hour added. E.g. 7pm becomes 8pm in the plot. I think this might be due to the fact that the dates are in daylight saving time period (april-october). When I change the dates to for example November, ggplot2 plots it fine. How can I fix this? As the time in the dataframe is the correct time (no need for +1 hour). I know I can just create a new column where it is time -1 hour but it seems that ggplot2 should just plot it at the right time from the start.
Thanks!
the code with some random data:
library(lubridate)
library(ggplot2)
ee = read.table(textConnection('Timestamp Temp.Diff
"5/14/2011 19:00" -0.385
"5/14/2011 19:10" -0.535
"5/14/2011 19:20" -0.484
"5/14/2011 19:30" -0.409
"5/14/2011 19:40" -0.385
"5/14/2011 19:50" -0.215'), header=TRUE)
ee$Timestamp <- mdy_hm(ee$Timestamp)
ggplot(data=ee, aes(x=Timestamp, y=Temp.Diff)) + geom_point()