Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 如何检查是否使用了matplotlibrc/使用了哪个matplotlibrc_Python 2.7_Matplotlib_Wxpython - Fatal编程技术网

Python 2.7 如何检查是否使用了matplotlibrc/使用了哪个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

我正在蟒蛇环境中使用python。导入matplotlib时,我遇到了与xwpython的兼容性问题。所以,我想切换后端。通常,这将通过matplotlibrc文件完成。但是,似乎忽略了
~/.config/matplotlib/
下的matplotlibrc。是否可以检查matplotlib导入期间是否使用了matplotlibrc文件以及使用了哪个matplotlibrc文件?使用python 2.7。

可以通过以下方式获取文件路径:

import matplotlib
print(matplotlib.matplotlib_fname())
在我的情况下,它返回:

“/Users/m300241/.matplotlib/matplotlibrc”