[R] 3 boxplots in one

Liaw, Andy andy_liaw at merck.com
Thu Feb 24 20:22:56 CET 2005


Do you want the boxplots to be in the same panel, or different panels, but
the same page/window?  If the former, it's probably easiest to construct a
data frame that will let you use bwplot to put them in the same panel.  If
the latter, see the help page for print.trellis on how you can place several
lattice graphics into the same page.

Andy

> From: Dean Sonneborn
> 
> 
> I currently have 3 separate boxplots but would like to put 
> them all in the 
> graphic so they would have the same scale. Below are the 
> three statements 
> and as you can see the Y axis is weight:
> bwplot(AWGT~  male2 ....
> bwplot(AWGT ~ bin_pcb2 .....
> bwplot(AWGT ~ bin_pcb2 | male2 .....
> 
> Does anyone have some sample code where they have done 
> something like this?
> Thanks,
> 
> Dean Sonneborn M.S.
> Public Health Sciences *
> University of California, Davis
> 916 734-6656
> 
> * formerly Epidemiology & Preventive Medicine
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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
> 
>




More information about the R-help mailing list