ggplot2: remove colour and draw borders in bar plot

后端 未结 2 333
甜味超标
甜味超标 2021-01-13 23:59

I am currently using ggplot2 to plot a barchart with too many levels in fill. As a result, I am unable tell when a bar ends and the other begin.

Here\'s my sample da

2条回答
  •  孤街浪徒
    2021-01-14 00:42

    I would use the ggplot function instead of qplot. Then you can set the color and fill manually:

    ggplot(data,aes(x=variable, y=Length.1,group=value))+
      geom_bar(fill="white",color="black")+
      geom_text(aes(label = Length.1), size = 3, hjust = 0.5, vjust = 3, position ="stack") +
      theme_bw()
    

提交回复
热议问题