I don't know the function well enough to explain the behaviour but am replying with a tip that is helpful in situations like this. I'm also adding an example.
If you want to set up a common display scale, make sure that the limit covers the range of possible data in each panel.
If you use limits, and if there is data point(s) outside the range of the limits, those data points are dropped.
In your example data,
y <- c(3,2.3,3.1,16,16.5,20)
16, 16.5, 20 are dropped if you set up ylim=c(0,8)
This is equivalent to:
qplot(x,y,data=d,geom="boxplot") + scale_y_continuous(limits=c(0,8))
If you don’t want to drop the data but just zoom in the area, use coord_carterian instead (see the difference in output).
qplot(x,y,data=d,geom="boxplot") + coord_cartesian(ylim=c(0,8))
--
--
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.