为什么geom_raster在knitr doc中被平滑了?

时间:2016-03-02 19:54:06

标签: r ggplot2 knitr geom-raster

我正在使用ggplot中的geom_raster绘制矩阵。如果我在RStudio中看自己的情节,它是未平滑的:

enter image description here

当我将knitr doc编译成PDF时,它会以某种方式变得平滑:

enter image description here

知道发生了什么事吗?

(忽略纵横比,我希望如此。)

R代码基本上是这个(变量名称已更改):

ggplot(subset(data, x != y), aes(x, y)) +
  geom_raster(aes(fill=the_fill), interpolate=FALSE) +
  facet_wrap(~a_facet)

0 个答案:

没有答案