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:\Python35\Lib\site-packages. To 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'