this seems to be because the default backend was set to something without a gui.
i set backend to WXAgg and it works now.
···
--------------------------
Message: 7
Date: Tue, 3 Mar 2009 16:44:41 -0800
From: Daniel Soto <danielrsoto@...287...>
Subject: [Matplotlib-users] error with ginput
To: matplotlib-users@lists.sourceforge.net
Message-ID: <3396D4EF-D0D8-43C4-B81D-3B7B94F11532@...287...>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yeshello,
ginput isn't working for me right now but was when i was using 0.98.3.
running the script below gives me the following traceback.
anyone know what is going on?thx,
drspython -c "import matplotlib;print matplotlib.__version__"
0.98.5.2
./gaelInput.py
Please click
Traceback (most recent call last):
File "./gaelInput.py", line 7, in <module>
x = ginput(3)
File "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/
python2.5/site-packages/matplotlib/pyplot.py", line 358, in ginput
return gcf().ginput(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/
python2.5/site-packages/matplotlib/figure.py", line 1073, in ginput
show_clicks=show_clicks)
File "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/
python2.5/site-packages/matplotlib/blocking_input.py", line 258, in
__call__
BlockingInput.__call__(self,n=n,timeout=timeout)
File "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/
python2.5/site-packages/matplotlib/blocking_input.py", line 96, in
__call__
self.fig.show()
AttributeError: 'Figure' object has no attribute 'show'# gaelInput.py
from pylab import arange, plot, sin, ginput, show
t = arange(10)
plot(t, sin(t))
print "Please click"
x = ginput(3)
print "clicked",x
show()