Here's two quick thoughts:

qplot(1, mpg, data=mtcars, geom="boxplot") + facet_grid(. ~ cyl, margins =T)
qplot(factor(cyl), mpg, data=mtcars, geom="boxplot") +
geom_boxplot(aes(x = "all"), width = 0.9)

Hadley

On Tue, Oct 21, 2008 at 12:41 PM, SalishSea <[EMAIL PROTECTED]> wrote:
>
> I'd like to generate a boxplot that has BOTH the overall distribution of a
> continuous variable (say age), and then a boxplot for  each level of a
> stratifying variable (e.g. site). Does anyone have prototype code for this?
>
> Thanks,
>
> --
> View this message in context: 
> http://www.nabble.com/GGPLOT-QPLOT-Boxplot-with-summary-tp20095591p20095591.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [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.
>



-- 
http://had.co.nz/

______________________________________________
[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