[R] B-W stacked area chart with pattern

Markus Didion markus.didion at env.ethz.ch
Wed Jan 30 09:15:56 CET 2008


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.

thank you very much for your help
Markus


Greg Snow wrote:
> I would question if a stacked area chart is really the best way to display information on 12 groups.  You can put a lot of information into the plot, but the viewer will probably experience information overload and not be able to get much useful information out of the plot.  Stacked area plots rely on people being able to compare areas and lengths, which we don't do as well as we compare positions in a graph.  If your viewer is needing to go back and forth between the legend and the graph, then the information will be harder to assimilate.  It may be better to use lattice/trellis graphs and plot each line in its own panel (on the same scale and possibly with a light background grid to make comparison easier).  If there are specific comparisons that you want to point out, then make a separate graph with just those comparisons leaving out the extra information that will just distract.
> 
> If you give us a better idea of what information you are trying to convey, we may be able to give you some better options for graphs to use.
> 
> If you really want to go the pattern route then you may want to look at the discussion from october that started with: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/111226.html and/or the discussion from earlier this week started by yaosheng CHEN with the subject "How to fill bar plot with textile rather than color".
> 
> Hope this helps,
> 
-- 

Markus Didion

Waldökologie				Forest Ecology
Inst. f. Terrestrische Oekosysteme	Inst. of Terrestrial Ecosystems
Departement Umweltwissenschaften	Dept. of Environmental Sciences
Eidg. Technische Hochschule		Swiss Fed. Inst. of Technology
ETH-Zentrum CHN G78			ETH-Zentrum CHN G78
Universitätstr. 22			Universitaetstr. 22
CH-8092 Zürich				CH-8092 Zurich
Schweiz					Switzerland

Tel +41 (0)44 632 5629		Fax +41 (0)44 632 1358	
Email markus.didion at env.ethz.ch
homepage: http://www.fe.ethz.ch/people/didionm



More information about the R-help mailing list