On 10/29/2010 11:33 PM, "Sibylle Stöckli" wrote:
Dear R users


I would like to group my barplot graph (see example on the R help link). The 
proposed R code, adding individual bars to the plot, looks really overwhelming. 
My specific dataset just consists of five groups and three different levels 
within each groups (the individual bars). The .txt file is read as matrix 
(horizontal: group, vertical: levels).

The R trellis barchart (function group="") is an easy function, but 
unfortunately the upper plot part look much different from other graphs. I would 
therefore prefer barplot to stansdardize my plots within the manuscript.

It would be very  helpful for me to know if anyone else has worked on the 
barplot group function.

Hi Sibylle,
I think you want something like barNest (plotrix). It will plot nested bars to whatever depth of nesting you want (although I don't think anyone would want more than three or four levels), and you can just display the final level if you want. I am competely rewriting this function at the moment to make it more flexible, and there should be a new version of plotrix turning up soon. However, the present function will give you an idea of what it will do.

Jim

______________________________________________
R-help@r-project.org 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