How to adjust the size of matplotlib legend box?

后端 未结 2 608
梦谈多话
梦谈多话 2020-12-22 19:34

I have a graph whose left upper corner is quite blank. So I decide to put my legend box there.

However, I find the items in legend are very small a

2条回答
  •  感情败类
    2020-12-22 20:07

    When you call legend you can use the prop argument with a dict containing size.

    plt.errorbar(x, y, yerr=err, fmt='-o', color='k', label = 'DR errors')
    plt.legend(prop={'size':50})
    

    E.g. change legend size

    See here for more info on legend

提交回复
热议问题