编辑曲线线和轴参数选项未显示在matplotlib中 [英] Edit curves lines and axes parameter option not showing in matplotlib

查看:114
本文介绍了编辑曲线线和轴参数选项未显示在matplotlib中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Python 2.6和PyQt4。 matplotlib后端设置为 Qt4Agg。

I'm using Python 2.6 and PyQt4. The matplotlib backend is set to "Qt4Agg".

该图显示出来,但是未显示编辑曲线参数的选项(看起来像一个绿色的勾选框)。

The plot shows up, but the option to edit the curve parameters (the one that looks like a green ticked box) is not showing up.

有什么想法吗?

编辑:
这是我没有看到的复选框:

Here is the checkbox that I am NOT seeing:

示例代码:

import matplotlib
matplotlib.use('Qt4Agg')
import matplotlib.pyplot as plt
matplotlib.rcParams['interactive'] = True
plt.ion()
x=[1,2,3]
plt.plot(x,x)
inp = input('Press enter to exit ')

编辑2:

我找到了一个线索,但我仍然不知道问题出在哪里。我尝试通过

I've found a clue, but I still don't know what the problem is. I tried importing the NavigationToolbar by

from matplotlib.backends.backend_qt4 import NavigationToolbar2QT 

,然后使用

print(help(NavigationToolbar2QT)) 

在使用最新版本Pyzo的Windows上,这种方法称为 edit_parameters (自我)。当我在Linux机器上对Python 2.6执行相同操作时,该方法完全消失了。可能是什么问题?

On Windows where I am using the latest version of Pyzo, a method called "edit_parameters(self)" is present. When I do the same for Python 2.6 on the Linux machine, that method is missing altogether. What could be wrong?

推荐答案

问题被识别为matplotlib的旧版本。

Problem identified as an old version of matplotlib.

这篇关于编辑曲线线和轴参数选项未显示在matplotlib中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆