> Thank you for a clear example, it works. I tried to play with
> superpose.polygon before to no avail, this clarifies things.
You're welcome.
> Another question: would you know how to add gridlines to the plot?
> I'd like to have a few horizontal gridlines on my barchart plot for
> better readability. Do I have to write a wrapper for panel.barchart?
Probably, but it's not as bad as it sounds. To reuse the previous
example:
barchart(yield ~ site,
groups=variety,
data = barley,
panel=function(...){panel.barchart(...); panel.grid(v=0, ...)})
(The v=0 argument stop vertical grid lines being drawn.)
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}
______________________________________________
[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.