On Wed, 2005-06-08 at 12:07 +0200, Sven C. Koehler wrote:
> Hello!
> 
> I would like to overlay barplot(1:10) with a barplot(seq(1:5, each=2)),
> indicating that 50% of each bar belongs to category X.  How do I do this
> in R?

If you pass a matrix to barplot, it will stack values from the same
column on top of each other. So something like

barplot(rbind(1:10, 1:10))

will do what you want.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to