Skip to content
Prev 17893 / 398502 Next

filled bars with patterns

Hi


<snip>
This appears to be a bug.  Can you file a bug report for this please?
I'm not sure when this might get implemented properly -- in the meantime,
here's a small extension of the example that will "cheat" to give the effect
I think you want ...

 m <- matrix(runif(30), ncol=5)
 barplot(m, beside=FALSE, col=rep(c("white", "light green", "pink"), 2),
         horiz=TRUE,
         xlim=c(0, 6), axes=FALSE)
 par(new=TRUE)
 barplot(m, beside=FALSE, col="blue",
         density=rep(c(10, 5, -1), 2),
         angle=rep(c(45, -45, 0), 2), horiz=TRUE,
         xlim=c(0, 6))
 par(new=TRUE)
 barplot(m, beside=FALSE, col="black", density=-1,
         horiz=TRUE,
         xlim=c(0, 6))
There are a number of places in R where several graphics parameters interact
with each other in a nasty way.  Suggestions for clarifications like this
are very welcome.  But even better would be a patch for the barplot code
that implemented the change :)

Paul


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._