ggplot2 make legend key fill transparent

前端 未结 5 2032
不知归路
不知归路 2021-02-07 03:27

I am trying to make the legend key fill for a ggplot transparent. I followed the instructions on one of Hadley\'s ggplot2 guides for changing the legend key fill, but for some

5条回答
  •  隐瞒了意图╮
    2021-02-07 04:01

    Additionally to legend.key = element_blank() you can put legend.background=element_blank() within theme(), to make the text transparent as well

    This will also make the default white background transparent when using gg_themes

提交回复
热议问题