I'm building a plot on which I've hidden the top and right axes with: (following the official example at https://matplotlib.org/stable/gallery/axisartist/simple_axisline3.html#sphx-glr-gallery-axisartist-simple-axisline3-py)
import matplotlib.pyplot as plt
from mpl_toolkits.axisartist.axislines import Axes
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(axes_class=Axes)
ax.axis["right", "top"].set_visible(False)
x_range = np.linspace(10, 20)
ax.plot(x_range, x_range+10)
Following that, I'm trying to set a custom fontsize for my x and y axes labels. Normally it's simply done with:
ax.set_xlabel("A (unit A)", fontsize=50)
ax.set_ylabel("B (unit B)", fontsize=50)
However, no effect is to be seen on the fontsize. Please see the figure output. No error is returned.
I guess the Axes subclass I'm calling from mpl_toolkits has a different way of doing so, but I did not manage how to do it?
Thank you in advance for your help.