Preventing a second legend

前端 未结 1 674
眼角桃花
眼角桃花 2021-01-05 06:51

I have a ggplot, which also displays a legend:

ggplot(dt.m, aes(x=pct.on.OAC.cont,y=Number.of.Practices, fill=Age.Group)) +
    geom_bar(stat=\"identity\",po         


        
相关标签:
1条回答
  • 2021-01-05 07:14

    Use show_guide = FALSE in geom_smooth:

    geom_smooth(aes(x=pct.on.OAC.cont,y=Number.of.Practices, colour=Age.Group),
                se=F, alpha=0.5, show_legend = FALSE)
    

    This suppresses drawing a legend.

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