ggplot2 make legend key fill transparent

前端 未结 5 2055
不知归路
不知归路 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:00

    I was going crazy with this behavior as well, so here is a working solution for your example:

    plot + guides(color=guide_legend(override.aes=list(fill=NA)))
    

    Check this thread for more information.

提交回复
热议问题