I looked on the internet and absolutely all the examples with multiple axes have the xlabel and ylabel at a default value and quite small
I used the following code to create the axes:
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
...
ax=[]
if twoaxes or threeaxes:
ax.append(host_subplot(111, axes_class=AA.Axes))
plt.subplots_adjust(right=0.75)
else:
ax.append(fig.add_subplot(111))
if twoaxes or threeaxes:
ax.append(ax[0].twinx())
if threeaxes:
ax.append(ax[0].twinx())
offset = 60
new_fixed_axis = ax[2].get_grid_helper().new_fixed_axis
ax[2].axis["right"] = new_fixed_axis(loc="right", axes=ax[2],offset=(offset, 0))
ax[2].axis["right"].toggle(all=True)
and I tried to change the font size with 3 methods and all failed
1)
ax[i].set_xlabel(xlabel, fontsize = fontsize)
2)
fontd = {'family' : 'serif',
'color' : 'darkred',
'weight' : 'normal',
'size' : fontsize,
}
ax[i].yaxis.set_label_text(ylabel, fontdict=fontd)
and 3)
ax[i].xaxis.get_label().set_fontsize(fontsize)
None of the methods worked and given that all the examples so far showed very small font for the axes' labels I suppose that it is either quirky difficult or not possible. Any idea is welcome at this stage.
I forgot to mention that when the axis is created with
fig.add_subplot(111)
all the methods mentioned above work just fine and the font size is changed.