matplotlib WX and Qt4Agg backends

Hi,

I have installed matplotlib with the "WX" and the "Qt4Agg" backend. Both
have problems:

with WX backend, I can plot something. But when I close the window and try
to plot again, nothing happens (no window opens).

with Qt4Agg I can plot something. But when I close the window and try to
plot again, I get the error I posted below.

Can something be done about one if these problems?

Thanks!
Nathan

The Error:

RuntimeError Traceback (most recent call last)

/net/gorgonzola/storage/nhuesken/svn/ActiveLearning/SVM/ModelSelection/Ergebnisse/<ipython

in <module>()

/net/gorgonzola/storage/nhuesken/svn/ActiveLearning/SVM/ModelSelection/Ergebnisse/plot.pyc
in plot(filename, line_list, name_list, reference)
      6 for i in xrange(len(line_list)):
      7
plt.plot(m[:,reference],m[:,line_list[i]],label=name_list[i])
      8 plt.legend(loc='best')
----> 9 plt.show()
     10

/export/home/nhuesken/usr/lib/python2.6/site-packages/matplotlib/backends/backend_qt4.pyc
in show()
     61 """
     62 for manager in Gcf.get_all_fig_managers():
---> 63 manager.window.show()
     64
     65 if DEBUG: print 'Inside show'

RuntimeError: underlying C/C++ object has been deleted

···

--
View this message in context: http://old.nabble.com/matplotlib-WX-and-Qt4Agg-backends-tp26315069p26315069.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

TheLonelyStar wrote:

/net/gorgonzola/storage/nhuesken/svn/ActiveLearning/SVM/ModelSelection/Ergebnisse/plot.pyc
in plot(filename, line_list, name_list, reference)
      6 for i in xrange(len(line_list)):
      7
plt.plot(m[:,reference],m[:,line_list[i]],label=name_list[i])
      8 plt.legend(loc='best')
----> 9 plt.show()
     10

Are you calling plt.show() more than once within a script? If so, I was
having a similar issue, but after reading this FAQ entry:

  http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show

I realized that the specific usage of show() is not supported (yet);
plt.show() can only be used once within a script. Out of luck!

I hope there is a resolution one way or the other, since it will make
matplotlib so much more useful than it already is.

Cheers,
Taro

···

--
View this message in context: http://old.nabble.com/matplotlib-WX-and-Qt4Agg-backends-tp26315069p26322550.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

The problem with the Qt4 backend was already reported on this (or the
developers) list. It is a regression in PyQt4 or sip and will be fixed
in the next release.

Darren

···

On Thu, Nov 12, 2009 at 12:13 PM, Taro Sato <ubutsu@...287...> wrote:

TheLonelyStar wrote:

/net/gorgonzola/storage/nhuesken/svn/ActiveLearning/SVM/ModelSelection/Ergebnisse/plot.pyc
in plot(filename, line_list, name_list, reference)
6 for i in xrange(len(line_list)):
7
plt.plot(m[:,reference],m[:,line_list[i]],label=name_list[i])
8 plt.legend(loc='best')
----> 9 plt.show()
10

Are you calling plt.show() more than once within a script? If so, I was
having a similar issue, but after reading this FAQ entry:

http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show

I realized that the specific usage of show() is not supported (yet);
plt.show() can only be used once within a script. Out of luck!

I hope there is a resolution one way or the other, since it will make
matplotlib so much more useful than it already is.