how to close (complitly destroy) pylab figure?

[Please "reply to all" to respond on list so others can contribute to
an participate in the discussion.]

One problem is you have set your backend in your matplotlibrc ile to
GTKAgg (this is the default) and Eric is a Qt editor. For starters,
you will want to set the backend the qt4agg -- see
http://matplotlib.sourceforge.net/doc/html/faq/installing_faq.html#backends

Getting interactive python shells embedded in user interfaces to work
with matplotlib is tricky because of GUI threading issues. ipython
has tackled this for most major GUIs, and I think they have support
for qt. Fernando and crew will be able to advise further.

JDH

···

On Mon, Sep 22, 2008 at 5:19 AM, dmitrey <dmitrey15@...2168...> wrote:

John Hunter wrote:

On Sun, Sep 21, 2008 at 3:28 PM, dmitrey <dmitrey.kroshko@...177...>
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.

Thanks for the feedback, I found that the code works OK from terminal, it
just fails to close from Eric IDE (the figure continue to exist). Here's
--verbose-helpful output (while running from the IDE)

Ipython does support the qt backends. I also use eric4, which works just fine
with the qt4 backend.

Darren

···

On Monday 22 September 2008 07:55:57 am John Hunter wrote:

On Mon, Sep 22, 2008 at 5:19 AM, dmitrey <dmitrey15@...2168...> wrote:
> John Hunter wrote:
>> On Sun, Sep 21, 2008 at 3:28 PM, dmitrey <dmitrey.kroshko@...177...>
>> 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.
>
> Thanks for the feedback, I found that the code works OK from terminal, it
> just fails to close from Eric IDE (the figure continue to exist). Here's
> --verbose-helpful output (while running from the IDE)

[Please "reply to all" to respond on list so others can contribute to
an participate in the discussion.]

One problem is you have set your backend in your matplotlibrc ile to
GTKAgg (this is the default) and Eric is a Qt editor. For starters,
you will want to set the backend the qt4agg -- see
http://matplotlib.sourceforge.net/doc/html/faq/installing_faq.html#backends

Getting interactive python shells embedded in user interfaces to work
with matplotlib is tricky because of GUI threading issues. ipython
has tackled this for most major GUIs, and I think they have support
for qt. Fernando and crew will be able to advise further.