[R] Stacked area plot for time series

Hadley Wickham hadley at rice.edu
Fri Dec 23 18:41:33 CET 2011


You are more likely to get a helpful response if you provide a
reproducible example - without that I can only guess that you need to
use approx so you get y values at same x values.

Hadley

On Wed, Dec 21, 2011 at 8:13 AM, UncleFish <bpneal at ucsd.edu> wrote:
> I wish to make a stacked area chart of a time series with three variables.
> The observations are very irregular, covering 500 years, with a few
> historical observations in the range 1500-1850, and then more regular
> observations since 1880 or so.  If I plot this in Excell it truncates the
> time series, but it can make a nice stacked area plot. My question is how
> can I have a correct x axis with a stacked plot in R? I thave tried the data
> in a zoo as well as a ts, and have tried ggplot2 and plotrix, but cannot get
> beyond a lattice plot.
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Stacked-area-plot-for-time-series-tp4221849p4221849.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.



-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-help mailing list