Is there a way to update fontproperties of the axes without:
- using rcParams or rc_context
- using the specific axis
- using set_xlabel/set_ylabel
I want to be able to update the labelsizes of the axes directly similar to the set function. Current methods I use have annoying syntax:
import matplotlib.pyplot as plt
props = dict(ylabel = 'ytest', xlabel = 'xtest')
# using rc_context
with plt.rc_context({'axes.labelsize' : 50}):
fig, ax = plt.subplots()
ax.set(**props)
fig, ax = plt.subplots()
ax.set(**props)
ax.yaxis.label.set_size(50)
ax.xaxis.label.set_size(50)
fig, ax = plt.subplots()
ax.set_ylabel('ytest', fontsize = 50)
ax.set_xlabel('xtest', fontsize = 50)
Preferably, I would like to access the font properties directly but the matplotlib api seems to have no option for this, am I missing something?