how to close (complitly destroy) pylab figure?

Hi all,
how to close (complitly destroy) pylab figure?

The feature is highly required for my module "openopt".

I expected something like this will work but it doesn't

from pylab import *
ion()
plot([1, 2, 3, 4], [1, 2, 3, 4])
draw()
# optional: ioff(); doesn't help as well
close('all')

Thank you in advance,
Dmitrey.

Could you be more precise about what you mean when you say it doesn't
work? It works for me, in that the figure window that was created is
raised, plotted into, and then destroyed. Please tell us what you
expect to happen and what actually happens, as well as what backend
and matplotlib version you are using/. Best is to put your code into
a script and run it with --verbose-helpful and post the output here
along with the other requested info.

JDH

ยทยทยท

On Sun, Sep 21, 2008 at 3:28 PM, dmitrey <dmitrey.kroshko@...177...> wrote:

Hi all,
how to close (complitly destroy) pylab figure?

The feature is highly required for my module "openopt".

I expected something like this will work but it doesn't