hadley/ggplot2 — Issue #283: Points with size 0 show up large and off-center in PDF files
Author: wch
Created: 2011-12-07 23:12:30+00:00
State: open

If you use points with size=0, they're pretty much invisible if you output to bitmap files like PNG. But when you output to PDF, they show up as large circles that are positioned with their upper-left corner at the specified x and y.

You generally won't use size 0 points, but that was the only way I could get geom_boxplot to hide the outliers. The reason I wanted to do that was to overlay the box plots on a violin plot, which is a standard thing to do.

```R
set.seed(123)
dat <- data.frame(x=LETTERS[1:3], y=rnorm(60))

p <- ggplot(dat, aes(x=x, y=y))
pdf('test.pdf', width=3, height=3)
p + geom_boxplot(outlier.size=0)
p + geom_point(size=0)
dev.off()
```

I was able to get them to be effectively invisible by setting outlier.size=.01. Should this workaround be used, or should I add an option to show/hide them, like "show.outliers"? Some solution is necessary for box plots to be used with violins.