Font size of the caption in a graph made in python

Asked

Viewed 3,572 times

1

I would like to know how to adjust the font size used in a caption in a graph made in Python using the matplotlib library. I did some research and found this shape.

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

There is another way to adjust the font size of the caption in such a way that it is proportional to the size of the figure?

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.