I am looking to increment the plot title font size, by bumping it from e.g. medium
to large
.
My plots are getting their base font size as well as modifiers from a matplotlibrc .conf
file.
This is commonly expressed like so:
font.size : 8
axes.titlesize : medium
Now, for one of my plots, I would like to increment the title font size, specifically. Were this a number (as it is for e.g. the linewidth), I could do something like:
from matplotlib import rcParams
newsize = rcParams['lines.linewidth']*2
But this won't work as easily as that.
I could, of course, use a dictionary or a series of elif
statements - but I am thinking matplotlib, knowing how to interpret these strings, perhaps also has some function to increment them. Do you know of such a thing?
EDIT: Someone has suggested this would be a duplicate of some other question. This question specifically inquires about incrementing the "string font size" (as I have written in the title of the question). This means that setting the font size manually to some integer is not an option (unless there is a way to convert matplotlibrc's small
or medium
to integers - which would also be unique to this question).