I'm trying to do the opposite -- I'm using hardcopy() to write the plots to file, so I'd like to have the gnuplot window close after Python finishes executing.

I'm using the X11 terminal (I'm working on a Mac, and aquaterm isn't cooperating).
Regardless of whether I do gp = Gnuplot.Gnuplot(persist = 1) or persist = 0, the old Gnuplot windows stay open, and I often end up with tons of open windows.

I'd be satisfied if we could just have the Gnuplot windows close after Python finishes executing.
It'd be even better if I could have Python close all figures from previous runs, but keep the figure open from the most recent Python execution. In other words, I'm looking for the Matlab `close all hidden` command.

>On 07/17/2011 05:03 AM, tony wrote:
>> I'm using gnuplot-py to monitor data from a serial port, and it works 
>> fine while the main python program is running. But I would like to keep 
>> the plot open after python closes - is that possible? I can obviously 
>> reopen the data file and reconstruct the plot, but it would be useful to 
>> keep the original plot window open.

>g = Gnuplot.Gnuplot(persist=True) , if your platform supports it.


Forrest Iandola