I have a time series serial record, and I'm having trouble plotting on an appropriate scale. Here's an example:
#Gerar sinal v1
v1=sin(seq(from=0, to=3*2*pi, length=11060))
#Gerar sinal v2
v2=sin(seq(from=0, to=5*2*pi, length=11060))
#Gerar série temporal horária entre 06-maio-2016 15h:00min e 10-ago-2017 10h:00min
time_series_total <- seq(from = as.POSIXct("2016-05-06 15:00"),
to = as.POSIXct("2017-08-10 10:00"), by = "hour")
So when I plot:
plot(x = time_series_total, y = v1, type = 'l', col = "red", xlab = "tempo")
lines(x = time_series_total, y = v2, col = 'blue')
legend("topright", legend=c("v1", "v2"),
col=c("red", "blue"), lty=1:1, cex = 1.25, box.lty=0,inset = 0.005)
... The abscissa scale is not legal
What I would like to present is the scale of the axes with the month and year information. What is the suggestion?