mam kod jak poniżej:Jak ustawić rozmiar czcionki w legendzie osi Matplotlib?
import matplotlib.pyplot as plt
from matplotlib.pyplot import *
from matplotlib.font_manager import FontProperties
fontP = FontProperties()
fontP.set_size('xx-small')
fig=plt.figure()
ax1=fig.add_subplot(111)
plot([1,2,3], label="test1")
ax1.legend(loc=0, ncol=1, bbox_to_anchor=(0, 0, 1, 1),
prop = fontP,fancybox=True,shadow=False,title='LEGEND')
plt.show()
To widać na wykresie, że ustawienie w fontSize nie wpływa na Legend Tytuł rozmiar czcionki.
Jak ustawić rozmiar czcionki tytułu legendy na mniejszy?
W ipython notesie, po prostu zrobić ' setp (gca(). get_legend(). get_texts(), fontsize = 'small') '. –