hadley/ggplot2 — pull request #499 by wch (2012-04-16 21:43:44+00:00)
Title: Allow empty data frame

Fix #31 and fix #332. This should be considered just a rough attempt to illustrate how it could be done. I modified `facet-null.r`, but `facet-wrap.r` and `facet-grid.r` should probably also be modified.

Note that there's a change in behavior -- plots with 0 rows of data are now allowed. For example:

```R
empty <- data.frame(x=numeric(0), y=numeric(0))

ggplot(empty, aes(x=x,y=y)) + geom_point()
```

This works, but there are no points, and no breaks. It's just a gray plotting area with "x" and "y" axis labels.