[R] Switching Axis in Time Series plotting

Gabor Grothendieck ggrothendieck at gmail.com
Fri Feb 12 04:49:25 CET 2010


Try this using the builtin ts series, Nile:

year <- c(time(Nile))
Nile. <- c(Nile)
plot(year ~ Nile., type = "l")


On Thu, Feb 11, 2010 at 10:19 PM, JSmaga <jeremie at 4ecap.com> wrote:
>
> Hi guys,
>
> I would like to know if it is possible to switch the X Y axis when plotting
> a time series.
>
> Precisely, what I would like to do is having the dates on the Y axis, and
> the numbers on the X axis.
>
> I know it is pretty uncommon but it would help me a lot!
>
> Thanks,
>
> Jeremie
> --
> View this message in context: http://n4.nabble.com/Switching-Axis-in-Time-Series-plotting-tp1478067p1478067.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list