For an informative figure, we typically have a number of text elements, including the title, labels of axes and ticks, legend, and any additional annotations. We can adjust the font size and font family in the default rc settings. These settings are set in a dictionary-like variable, matplotlib.rcParams, so you can do import matplotlib and define a parameter like this:
matplotlib.rcParams['font.size'] = 18
Matplotlib also provides functions to alter the settings. The matplotlib.rc() changes the parameters one by one, whereas matplotlib.rcParams.update() accepts a dictionary input to change multiple settings simultaneously. Let's say we would like to change the font size to 20 and font family to serif, then use. We can do so in two ways:
matplotlib.rc('font', size=18)
matplotlib.rc('font&apos...