Dear useRs,

I search for a possibillity to plot stacked bars at specific x positions.
I tried and tried, but the only way i got something adequate was by using 
lowlevel plots segments(). That is quiet ok, but will not please eyes without a 
lot of par() lines.

dh<-data.frame(longitude=abs(rnorm(5)),deers=abs(rnorm(5)),humans=abs(rnorm(5)))

plot(dh$longitude,apply(dh[,2:3], 1, sum),type="n",ylim=c(0,max(apply(dh[,2:3], 
1, sum))))
segments(dh$longitude,0,dh$longitude,dh$deers, col="green", lwd=12)
segments(dh$longitude,dh$deers,dh$longitude,dh$deers+dh$humans, col="red", 
lwd=12)

I hope somebody is experienced in doing such plots or somebody just knows how 
to do it.

Bastian

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

______________________________________________
[email protected] 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.

Reply via email to