当我保存 ggplot 图像时theme_minimal
,黑白值在照片负片效果中反转。如果我不使用主题,也不会使用 theme_bw,则不会发生这种情况。.pdf
保存到或时也不会发生这种情况.png
。我已经测试过,在 RStudio、R GUI 或通过终端运行时会发生这种情况。我在 Mac OS 10.15.7 上运行 R 版本 4.0.2。
我将不胜感激任何有关调试的见解。该行为在多次完整系统重新启动后持续了数周。
library(ggplot2)
ggplot(diamonds, aes(x = cut, y = clarity)) +
geom_point() +
theme_minimal()
ggsave("test_minimal.jpg")