[SciPy-user] Problem with Mplt.py in non-interactive use

A.Schmolck a.schmolck at gmx.net
Fri Mar 22 11:01:48 CST 2002


I've got a problem with Mplot that I find somewhat baffling: what works fine
in interactively on a step-by-step basis doesn't necessarily in
non-interactive sessions.  For example the following code-fragement will do
what one would expect if one executes it line by line (i.e. it draws a plot,
then waits the specified time). If I execute it as a whole with "python
TestMplot.py", however, it doesn't plot anything, it just fires up an empty
window that stays empty (despite the fact that the sleep commands should give
any hypothetical concurrent process plenty of time to do whatever it
wants). If I use py-shell from emacs or python "-i TestMplot.py", the same
happens, except that once the interactive prompt comes back something is
actually plotted. I also experienced the more serious problem that something
that worked step-by-step in an interactive plot causes:

gist.error: Gist GdLines plotter failed

after which all line plotting fails...

Any idea why that might be the case and what could be done about it? I
currently really fail to see what might be going on...

from scipy.xplt import Mplot as plt
import time
from Numeric import *
print "TESTING"
plt.plot([1,2,3], [1,2,3])
plt.plot([1,2,3], [1,2,3], "gx")
plt.plot([1,2,3], [1,2,3], "gx", [1,2,3], [4,6,7], "r-")
plt.imagesc(reshape(arange(12), (3,4)))



P.S.: I'm using a recent (last week's, I think) CVS version of scipy

Alexander Schmolck     Postgraduate Research Student
                       Department of Computer Science
                       University of Exeter
A.Schmolck at gmx.net     http://www.dcs.ex.ac.uk/people/aschmolc/

More information about the SciPy-user mailing list