Control bar border (color) thickness with ggplot2 stroke

后端 未结 1 487
误落风尘
误落风尘 2021-02-04 07:57

Is it possible to use the stroke argument introduced with ggplot2 2.0 to adjust the thickness of borders around bars? If not, is there a way to control bar-border

1条回答
  •  囚心锁ツ
    2021-02-04 08:44

    well as I suggested by the OP, I will just recopy my comment as an answer.

    you just need to set size in your geom_bar() expression:

    geom_bar(stat = "identity", aes(fill = "transparent", size = ifelse(factor2 == "A", 2, 1)), size=2)
    

    0 讨论(0)
提交回复
热议问题