Python 2.7 如何检查是否使用了matplotlibrc/使用了哪个matplotlibrc
我正在蟒蛇环境中使用python。导入matplotlib时,我遇到了与xwpython的兼容性问题。所以,我想切换后端。通常,这将通过matplotlibrc文件完成。但是,似乎忽略了Python 2.7 如何检查是否使用了matplotlibrc/使用了哪个matplotlibrc,python-2.7,matplotlib,wxpython,Python 2.7,Matplotlib,Wxpython,我正在蟒蛇环境中使用python。导入matplotlib时,我遇到了与xwpython的兼容性问题。所以,我想切换后端。通常,这将通过matplotlibrc文件完成。但是,似乎忽略了~/.config/matplotlib/下的matplotlibrc。是否可以检查matplotlib导入期间是否使用了matplotlibrc文件以及使用了哪个matplotlibrc文件?使用python 2.7。可以通过以下方式获取文件路径: import matplotlib print(matplot
~/.config/matplotlib/
下的matplotlibrc。是否可以检查matplotlib导入期间是否使用了matplotlibrc文件以及使用了哪个matplotlibrc文件?使用python 2.7。可以通过以下方式获取文件路径:
import matplotlib
print(matplotlib.matplotlib_fname())
在我的情况下,它返回:
“/Users/m300241/.matplotlib/matplotlibrc”