hi there,
I've got a bit stuck with running matplotlib in interactive mode. maybe
what I want to do can't be done easily.
want I want is a simple python script which I can run with a file argument.
this will then create some plots. the script will wait for user input (via
sys.stdin.readline()), use the input to adjust a threshold and replot my
plots. after the user is satisfied with the thresholds the script exit the
loop and will perform other processing. Basically I'm trying to get a
simple interactive program with plots but without having use wxpython or
simliar
I have been trying to test the potting part of this.
I have successfully set interactive mode on and from the python interpreter
I can plot and I see my plots and updates to them without needing to use
pyplot.show().
when I run the same scripts by using 'python scriptname.py' I don't see the
plots unless I use pyplot.show().
my simple test script is as follows
···
############
#test interactive matplotlib plotting
import numpy as np
import sys
import matplotlib.pylab as pyp
a=np.array([0,4,5,5,3,4,5])
pyp.figure()
pyp.plot(a)
#pyp.show()
input=sys.stdin.readline()
pyp.xlabel('my xlabel %s' %input)
input=sys.stdin.readline()
any help much appreciated
--
View this message in context: http://old.nabble.com/matplotlib-in-interactive-mode-from-a-script-tp29023641p29023641.html
Sent from the matplotlib - users mailing list archive at Nabble.com.