Legend font size in a python chart

0

I would like to know how to adjust the font size used in a legend in a Python chart using the matplotlib library. I did a search and found this form.

plt.legend(loc='upper left', prop={'size':12})

Is there another way to adjust the font size of the caption so that it is proportional to the size of the picture?

    
asked by anonymous 01.08.2014 / 01:10

1 answer

1

If you add this to the code, all your generated figures will have the same font in the caption.

import matplotlib.pyplot as plt
plt.rcParams['legend.fontsize'] = 12
    
26.09.2014 / 15:02