Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check whether/which matplotlibrc was used

I am using python in an anaconda environment. When I import matplotlib I am getting compatibility issues with xwpython. So, I would like to switch the backend. Usually, that would be done with a matplotlibrc file. However, it seems that matplotlibrc under ~/.config/matplotlib/ is ignored. Is it possible to check whether and which matplotlibrc file was used during import of matplotlib? Using python 2.7.

like image 966
Soren Avatar asked Jul 04 '16 18:07

Soren


1 Answers

You can get the file path using:

import matplotlib
print(matplotlib.matplotlib_fname())

Which in my case returns:

'/Users/m300241/.matplotlib/matplotlibrc'

like image 61
Bart Avatar answered Oct 23 '22 09:10

Bart