0

I am plotting a matrix with geom_raster in ggplot. If I look at the plot myself in RStudio, it is unsmoothed:

enter image description here

When I compile the knitr doc into a PDF, it gets smoothed somehow:

enter image description here

Any idea what's happening?

(Ignore the aspect ratio, I'd expect that.)

The R code is basically this (variable names changed):

ggplot(subset(data, x != y), aes(x, y)) +
  geom_raster(aes(fill=the_fill), interpolate=FALSE) +
  facet_wrap(~a_facet)
dfrankow
  • 20,191
  • 41
  • 152
  • 214

0 Answers0