我试图把情节和"grey20“作为情节背景结合起来。然而,在组合情节时,一种不想要的行为似乎正在发生,因为顶部情节和底层情节之间出现了一条较轻的分隔线。
有人知道这是因为我的错误,还是有办法避免这种令人不快的行为?
非常感谢你的帮助!
最好的
# plotA
plotA <- plot_spacer()+ theme(plot.background = element_rect(fill = "grey20",color = "grey20"))
# plotB
plotB <- plot_spacer()+ theme(plot.background = element_rect(fill = "grey20",color = "grey20"))
# plotC
plotC <- plot_spacer()+ theme(plot.background = element_rect(fill = "grey20",color = "grey20"))
# Combining plots
(plotA / (plotB + plotC )) + plot_layout(heights = c(1,.1))编辑-尽管这个问题似乎来自我特定的图形设备设置,因为这个问题并不是在直接使用R(而不是RStudio)时发生的,但是这个问题还是通过添加了以下元素代码来纠正:
((plotA / (plotB + plotC )) + plot_layout(heights = c(1,.1))) & theme(plot.background = element_rect(fill = "grey20",color = "grey20")发布于 2021-04-05 19:15:09
编辑-
谢谢大家的回答,现在情况已经解决了!
我从这种情况中了解到三件事:
((plotA / (plotB + plotC )) + plot_layout(heights = c(1,.1))) & theme(plot.background = element_rect(fill = "grey20",color = "grey20")最好的
亨利
https://stackoverflow.com/questions/66939718
复制相似问题