Edit curves lines and axes parameter option not showing in matplotlib

只愿长相守 提交于 2019-12-02 00:32:54

问题


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.

Any ideas?

Edit: Here is the checkbox that I am NOT seeing:

Sample code:

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 ')

Edit 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 

and then accessed the documentation with

print(help(NavigationToolbar2QT)) 

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?


回答1:


Problem identified as an old version of matplotlib.



来源:https://stackoverflow.com/questions/33609219/edit-curves-lines-and-axes-parameter-option-not-showing-in-matplotlib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!