[R] B-W stacked area chart with pattern

hadley wickham h.wickham at gmail.com
Wed Jan 30 14:51:56 CET 2008


On Jan 30, 2008 2:15 AM, Markus Didion <markus.didion at env.ethz.ch> wrote:
> Thank you Greg for your comments.
> Here is a (very) simple example of what my data might look like:
>
> res <- matrix(sample(20:25, 41*12, replace=T), nrow=12, ncol=41,
> dimnames=list(c(paste("sp",1:12)), c(seq(0, 200, by=5))))
> barplot(res, space=0, legend.text=T, beside=F, col=c("white","grey50"),
> border=NA)
> barplot(res, space=0, beside=F, angle=seq(0, 180, by=45), density=30,
> col="black", border=NA, xlab="time", ylab="biomass (t/ha)", add=T)
>
> I have 3 replicates of the data for 2 sites that all have small but
> important differences. I would like to show them on a panel with 3
> columns and 2 rows.  This is why I thought using stacked area charts as
> they would let you easily compare between the 3 replicates.

Are the important differences in the totals or in the individual
values?  Is there any intrinsic ordering to the species?  To me, that
data screams out to be drawn with lines - which also eases the legend
problem as you could label each line directly.

Hadley

-- 
http://had.co.nz/



More information about the R-help mailing list