I have a sizeable number of python data-inspection scripts that work as
- read some data, or do something with it
- plot the data
- query the user on the command line and get a response
- do what the user commands.
These use the venerable PGPLOT package for the graphics, but this has been
static for years and is getting increasingly vulnerable to obsolescence of
the supporting packages (e.g., numarray).
I'm having a hard time converting these scripts to matplotlib because when
you do a show(), the mainloop takes over. It's possible to work around by
doing a show() for every plot, and then killing the plot manually, but after
a couple of hundred manual kills this gets tiresome. It would also be
possible to restructure the code so that the various options get controlled
by key press events in the plot, I suppose, but the effort involved in
converting all the scripts would be pretty large.
So my question: Is there a simple way of getting matplotlib to display a
plot in a window and then surrender control to the main program, without
destroying the plot? Something like a method to kill mainloop would be
[Apologies if this is general knowledge -- I couldn't find an answer.]
View this message in context: http://old.nabble.com/Non-interactive-plotting-to-window--tp32981792p32981792.html
Sent from the matplotlib - users mailing list archive at Nabble.com.