ggplot legend slashes

前端 未结 2 1770
北荒
北荒 2020-12-16 12:21

This must have annoyed someone in the past so excuse me if this is a duplicate and I will remove it. Slashes across legends when using geom_bar can be annoying

2条回答
  •  鱼传尺愫
    2020-12-16 12:39

    No that's what gives it it's outline. If you use a gray instead of white (with your trick) it's more distinguishable. You could also add background color to the legend to make it more distinguishable and keep it white. See the bottom of this page for more detail:

    http://wiki.stdout.org/rcookbook/Graphs/Legends%20(ggplot2)/

    i wish there were a less hackish way to do this.

提交回复
热议问题