From what I understand of this documentation matplotlib
provides 3 ways to change the style parameters for plotting (things like axes.grid
). Those ways are: using style sheets to set many parameters at a time; setting specific parameters through matplotlib.rcParams
or matplotlib.rc
; or using a matplotlibrc
file to set defaults.
I would like to understand if all of the parameters are accessible in each of the methods I listed above and where I can find a comprehensive list of all of the parameters.
I have tried to understand this from the linked documentation, but I often fail. A specific example is setting the axis font. I typically use a combination like this:
axis_font = {'fontname':'Arial', 'size':'32'}
ax.set_ylabel('some axis title',**axis_font)
But it is not clear what matplotlib
parameter (if any) I have set. Does there exist a parameter for the axis font that could be included in a style file for example?
Other attempts in my code include confusing blocks like:
legend_font = {'fontname':'Arial', 'size':'22'}
#fonts global settings
matplotlib.rc('font',family=legend_font['fontname'])
By the names it seems like it would be changing the legend font, but actually it is clearly setting the parameter for the overall font. And the size is not being used. Are there matplotlib
parameters for specifically the legend font and legend size?
The things I've tried are:
- Checking the example
matplotlibrc
at the bottom of the linked page (no sign of axis or legend fonts specifically) - Printing
matplotlib.rcParams
(no sign of axis or legend fonts) - Checking the axis api (could not match up with example style files e.g. the classic predefined style file has
facecolor
set, which is mentioned in that page, but it also hasedgecolor
set which is not mentioned on the page)