编辑曲线、直线和轴参数选项未显示在matplotlib中

2024-04-16 14:30:09 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是python2.6和PyQt4。matplotlib后端设置为“Qt4Agg”。在

此时将显示绘图,但编辑曲线参数的选项(看起来像绿色勾选框的参数)未显示。在

有什么想法吗?在

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

enter image description here

样本代码:

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:

我找到了线索,但我还是不知道问题出在哪里。我尝试导入导航工具栏

^{pr2}$

然后用

print(help(NavigationToolbar2QT)) 

在使用最新版本Pyzo的Windows上,存在一个名为“edit_parameters(self)”的方法。当我在Linux机器上对Python2.6执行相同的操作时,这个方法完全丢失了。怎么了?在


Tags: 方法import编辑绘图参数matplotlib选项plt