ggpairs 用白色填充直方图

ggpairs fill histograms with white

我想得到下图中白色的直方图或条形线。主要是为了省墨。

library(GGally)
library(ggplot2)
data(tips, package = "reshape")
pm <- ggpairs(tips[,1:3])

我试过了

pm + theme(panel.background = element_rect(fill = "white"),
plot.background = element_rect(fill = "white"),rect= element_rect(fill="white"))

但无法达到直方图填充。

有什么帮助吗?

这应该可以满足您的要求:

ggpairs(tips[,1:3], params = c(fill = "white", color = "black")) + 
  theme_bw()