I have copied and put in my configurations in ~/.config/matplotlib/matplotlibrc .
Then I checked in python which matplotlibrc it is using. It is still the default one.
>>> import matplotlib
>>> matplotlib.matplotlib_fname()
'/Users/home/Library/Python/3.10/lib/python/site-packages/matplotlib/mpl-data/matplotlibrc'
The configs I put in are not effective. From the documentation, the one in .config should take precedence.
I tried restarting the terminal, but nothing worked. If I put the matplotlibrc file in the working directory of Python, it successfully chooses the one in the directory. But it never uses the one in .config/. I read from this thread that I have to delete the .matplotlib dir. I tried but it is recreated as soon as I launch Python, and nothing is changed. What would be the problem?
I use a Macbook on MacOS 14.4.1.
~/.matplotlib/matplotlibrcfor MacOS. To troubleshoot the location of yourmatplotlib/configuration directory, usematplotlib.get_configdir()