matplotlib.show()挂起一个无限循环

时间:2016-08-20 01:43:11

标签: matplotlib anaconda python-3.5

注意:请不要将其标记为重复,之前的问题不会完全回答。

此问题已在此链接中得到部分回答:     plt.show() hangs on OSX with Anaconda Python

但是,没有提到matplotlibrc在哪里更改选项。另外,特别是当我们使用ipython notebook命令调用笔记本时,我们可以在哪里使用pythonw来解决这个问题?

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

对我来说(W10 x64),matplotlibrc位于文件夹

C:\ Program Files \ Anaconda \ Lib \ site-packages \ matplotlib \ mpl-data

它只是一个文本文件,您可以使用任何编辑器编辑以更改选项。 什么工作(但我真的不理解所有这些)是以下配置(第38行及以下):

backend      :  Qt4Agg 

# If you are using the Qt4Agg backend, you can choose here
# to use the PyQt4 bindings or the newer PySide bindings to
# the underlying Qt4 toolkit.

#backend.qt4 : PyQt4        # PyQt4 | PySide

评论最后一行是必要的,以便最终绘制任何曲线。

对于你的第二个问题,我很抱歉,我根本无法提供帮助。

我希望这会对你有所帮助,祝你好运!

相关问题