hadley/ggplot2 — pull request #349 by kohske (2012-01-06 04:54:32+00:00)
Title: fix a bug in geom-raster: correctly handle 1D horizontal matrix.

My fix have introduced another bug.
Indexing by `drop = TRUE` makes 1xN 2D matrix into 1D vector.
Here it should be `drop = FALSE`.

examples:

```R
df1 <- data.frame(x = -3:3, y = -3:3)
df2 <- data.frame(x = seq(-2, 2, 0.1), y = 0, z = dnorm(seq(-2, 2, 0.1)))
df3 <- rename(df2, c(x = "y", y = "x"))

p <- ggplot(NULL, aes(x, y)) + geom_point(data = df1)
p1 <- p + geom_tile(aes(fill = z), data = df2)
p2 <- p + geom_raster(aes(fill = z), data = df2)
p3 <- p + geom_tile(aes(fill = z), data = df3)
p4 <- p + geom_raster(aes(fill = z), data = df3)
```