hadley/ggplot2 — Issue #417: Different output of geom_raster to graphic device and PDF
Author: jiho
Created: 2012-02-29 04:08:49+00:00
State: open

library(ggplot2)
d <- expand.grid(x=1:10, y=1:10)
d$z <- runif(100)
ggplot(d) + geom_tile(aes(x=x, y=y, fill=z))
ggsave("test_tile.pdf")
ggplot(d) + geom_raster(aes(x=x, y=y, fill=z))
ggsave("test_raster.pdf")
ggsave("test_raster.png")
system("open test_*.p*")

Copy-pasting from a quartz device on OS X gives even stranger results: http://dl.dropbox.com/u/1047321/ggplot2-bugs/test_raster-copy_paster.pdf