I am trying to make a plot in r where the x-axis is time stamps from the vector called time
.
The values in time
:
[1] "04:00:00" "06:00:00" "08:00:00" "10:00:00" "12:00:00" "14:00:00" "16:00:00" "18:00:00" "20:00:00" "22:00:00" "24:00:00"
However, the plot still put the values 2, 4, 6 and so on in between the time stamps? The code I use for the plot:
sumH1<-plot(tempsSumH1, type="l",xlab="Time",ylab="Temp")
axis(1,at=1:11,labels = time,tick = FALSE)
Note that the even numbers do not necessarily need to be replaced with the time in the vector but can be left completely empty.