小编Bru*_*uno的帖子

如何在 ggplot 背景(不是面板)上添加图像?

如何使用图像作为 ggplot2 图的背景?

例如,代码:

mtcars %>% 
  ggplot(aes(cyl)) + 
  geom_bar() + 
  theme(plot.background = element_rect(fill = "black"))
Run Code Online (Sandbox Code Playgroud)

结果如下: 阴谋
并且背景颜色为黑色。

如何选择图像作为背景,而不仅仅是选择其颜色?

background r image ggplot2

2
推荐指数
2
解决办法
1948
查看次数

标签 统计

background ×1

ggplot2 ×1

image ×1

r ×1