How to increase size of legend in ggplot2

后端 未结 1 1269
慢半拍i
慢半拍i 2020-12-12 00:32

I\'m new to the ggplot plotting library in R and can\'t work out how to increase the size of my legend. I know you can do axis manipulation with

1条回答
  •  不知归路
    2020-12-12 00:54

    Add

    ...
    + theme(
       legend.key.width = unit(1, "cm"),
       legend.key.height = unit(2, "cm")
      )
    

    and change the units to what best fits your needs.

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