Boxplot question

37 views
Skip to first unread message

Marco Gamba

unread,
Dec 10, 2015, 12:03:03 PM12/10/15
to ggplot2
Hi all,
I am a newbie of ggplot2 and I need your help in formatting a boxplot. 
See below the lines I am using to produce the pictured plots.
I’d like to set all the boxplots to the same horizontal size but I am not able to do that.
Can you help me?
Many thanks.
Marco

ggplot(x2, aes(x=DPType, y=Interval, fill=IOI)) + 
geom_boxplot() + 
labs(title="",x="DPtype", y = "Interval (s)") + 
facet_grid(. ~ Sex) +  scale_fill_brewer(palette="Dark2") + theme_minimal() + theme(strip.background = element_rect(colour="white", fill="white”))



BoxPlot_IOI.pdf

Ben Bond-Lamberty

unread,
Dec 10, 2015, 1:13:37 PM12/10/15
to Marco Gamba, ggplot2
This should answer your question:

http://stackoverflow.com/questions/16705129/force-boxplots-from-geom-boxplot-to-constant-width

Basically, you're missing combinations of some of your factors, so
need to add some dummy data.

Ben
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ggplot2+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
>
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ggplot2+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
Reply all
Reply to author
Forward
0 new messages