Configuring within Python code

To keep settings throughout the current session, we can execute matplotlib.rcParams to override configuration file settings.

For instance, we can set the font size of all text in plots to 18 with the following:

matplotlib.rcParams['font.size'] = 18

Alternatively we can call the matplotlib.rc() function. As matplotlib.rc() just changes one property, to change multiple settings, we can use the function matplotlib.rcParams.update(), and pass parameters in the form of a dictionary of key-value pairs:

matplotlib.rcParams.update({'font.size': 18, 'font.family': 'serif'})
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.34.78