如何在这里设置条形边框的颜色?

时间:2019-06-24 12:39:04

标签: r ggplot2

当我使用ggQC绘制pareto图时,如何在此处设置条形的边框颜色?我不希望它是黑色的。预先谢谢你。

library(ggQC)
df <- data.frame(x=c("1","2","3","4"),y=c(100,50,20,4))
ggplot(df, aes(x=x, y=y)) + stat_pareto(point.size = 2,              
              line.color = "black",              
              bars.fill = c("#3399FF")) + theme_minimal() 

enter image description here

1 个答案:

答案 0 :(得分:0)

注意::我创建了该存储库的副本,并添加了一个灵活的bars.colour参数,可用于执行此操作。请注意,作者尚未批准(我不确定他们是否会批准)。我很抱歉是否违反他们的供款政策。

您可以按以下方式下载它:

devtools::install_github("Nelson-Gon/ggQC")

然后做:

ggplot(df, aes(x=x, y=y)) + stat_pareto(point.size = 2,              
                                        line.color = "black",              
                                        bars.fill = c("#3399FF"),
                                        bars.colour = "red")

结果: enter image description here

相关问题