Overriding legend symbol size in ggplot

前端 未结 1 1958
无人及你
无人及你 2021-01-07 11:46

I am trying to override my symbol size aes using commands I have found in this forum and elsewhere. I can get the alpha override to work but not the size.

f         


        
相关标签:
1条回答
  • 2021-01-07 12:20

    Your alpha override is overwriting your size override. Change this:

    guides(colour = guide_legend(override.aes = list(size=5))) +
    guides(colour = guide_legend(override.aes = list(alpha = 1))) +
    

    to this:

    guides(colour = guide_legend(override.aes = list(size=5, alpha = 1))) +
    

    In the future, please try to include minimal working examples. This means both providing data (to make it a working example) and also not bothering with things like all your optns (to keep it minimal).

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