У меня возникли проблемы с настройкой размера шрифта числовых меток на оси Y моих графиков.Настройка размера шрифта, по-видимому, корректирует только текст в поле легенды.
Регулировка «осей» не работает, потому что я использовал axes.ravel()
, чтобы помочь получить набор из четырех сюжетов размером 2x2.
"axes.set_xlabel (fontsize = 'large', fontweight = 'bold') AttributeError: у объекта 'numpy.ndarray' нет атрибута 'set_xlabel'"
#The part of the code that creates the subplots.
fig, axes = plt.subplots(nrows=2, ncols=2, figsize=(40,20), squeeze=False, sharey=True)
axes = axes.ravel()
font = FontProperties()
font = {'weight' : 'bold','size' : 22}
plt.rc('font', **font)
#Then under here are the loops that create each subplot.
for each_subplot in range(0,4):
axes.set_xlabel(fontsize='large', fontweight='bold')
#Selecting the input data goes here, but I left it out.