Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit curves lines and axes parameter option not showing in matplotlib

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:

enter image description here

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?

like image 797
Halldinz0r Avatar asked Sep 20 '25 15:09

Halldinz0r


1 Answers

Problem identified as an old version of matplotlib.

like image 102
Halldinz0r Avatar answered Sep 22 '25 05:09

Halldinz0r