How can I change the title of a ggplot2 legend?

后端 未结 4 734
小蘑菇
小蘑菇 2020-12-25 12:38

I was looking here but I can\'t figure it out.

How can I change the word \"type\" to something else?

4条回答
  •  萌比男神i
    2020-12-25 13:17

    None of the others worked for me for some reason. In case they failed for you as well, adding this worked for me:

    + guides(fill=guide_legend(title='MY NEW TITLE'))
    

提交回复
热议问题