Finding the rc configuration file

On Linux/Unix systems, you can set a global configuration for all users on the machine by editing /etc/matplotlibrc for $HOME/.matplotlib/matplotlib/rc or ~/.config/matplotlib/matplotlibrc.

On Windows, the default matplotlibrc file may be placed in C:Python35Libsite-packagesTo find the path of the currently active matplotlibrc file, we can use the matplotlib_fname() function of Matplotlib in Python shell as follows:

In [1]: import matplotlib as mpl
        mpl.matplotlib_fname()
Out[1]: '/home/mary/.local/lib/python3.6/site-packages/matplotlib/mpl-data/matplotlibrc'
The rc configuration file is found under $INSTALL_DIR/matplotlib/mpl-data/matplotlibrc, where $INSTALL_DIR is where you installed Matplotlib, which usually looks like python3.6/site-packages/. The rc file in the installation directory will be overwritten at each update. To keep the changes persistent across version updates, please keep them in the local configuration directory, such as '/home/mary/.config/matplotlib/matplotlibrc'
..................Content has been hidden....................

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