gpt4 book ai didi

r - ggpairs 用白色填充直方图

转载 作者:行者123 更新时间:2023-12-02 01:31:52 24 4
gpt4 key购买 nike

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

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()

enter image description here

关于r - ggpairs 用白色填充直方图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33735492/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com