two issues with the QtAgg backend

Hmm - I believe that message is from a SWIG error which is what wraps Qt into Python. So that would mean that the Qt object is being deleted w/o the python finding out about it.

     37 figManager = Gcf.get_active()
     38 if figManager != None:
---> 39 figManager.canvas.draw()

This makes me think that the canvas is being deleted. I wonder if we need to trap the window close and somehow tell the figure manager about it?

···

At 08:25 AM 3/20/2006, you wrote:

Hi Ted,

Yes, the figure size is good, thanks!

I still see the other problem, if I close that first plot window, and then try
to make a new plot:

---------------------------------------------------------------------------
exceptions.RuntimeError Traceback (most recent
call last)

/home/darren/<ipython console>

/usr/lib64/python2.4/site-packages/matplotlib/pylab.py in plot(*args,
**kwargs)
   2012 try:
   2013 ret = gca().plot(*args, **kwargs)
-> 2014 draw_if_interactive()
   2015 except:
   2016 hold(b)

/usr/lib/python2.4/site-packages/IPython/genutils.py in wrapper(*args, **kw)
    805 def wrapper(*args,**kw):
    806 wrapper.called = False
--> 807 out = func(*args,**kw)
    808 wrapper.called = True
    809 return out

/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_qt.py in
draw_if_interactive()
     37 figManager = Gcf.get_active()
     38 if figManager != None:
---> 39 figManager.canvas.draw()
     40
     41 def show( mainloop=True ):

/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_qtagg.py in
draw(self)
    113 if DEBUG: print "FigureCanvasQtAgg.draw"
    114 self.replot = True
--> 115 self.repaint( False )
    116
    117 def print_figure( self, filename, dpi=150, facecolor='w',
edgecolor='w',

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

On Monday 20 March 2006 11:09, you wrote:
> Darren,
> Can you check the latest MPL? We submitted a patch that fixed a Qt
> resizing bug and I was wondering if it has fixed any of the problems you
> were having.
>
> Ted
>
> At 03:01 PM 2/18/2006, you wrote:
> >I'm having two problems with the QtAgg backend. If I do:
> > >>> from pylab import *
> > >>> plot([1,2])
> >
> >[<matplotlib.lines.Line2D instance at 0x2aaab1ead830>]
> >
> > >>> show()
> >
> >My figure window should be 8in x 6in, but instead it is 6in tall and as
> > wide as my screen will allow. So thats the first issue. The second is
> > this: if I close that window, and then do
> >
> > >>> plot([1,2])
> >
> >[<matplotlib.lines.Line2D instance at 0x2aaab1ebbcf8>]
> >
> > >>> show()
> >
> >I get the following traceback:
> >
> >Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > File
> > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_qt.py",
> >line 47, in show
> > manager.window.show()
> >RuntimeError: underlying C/C++ object has been deleted
> >
> >I'm using qt version 3.3.4, with cvs mpl 0.86.2, on a gentoo linux system.
> >The
> >only nondefault rc setting is the choice of backend.
> >
> >Darren
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files for problems? Stop! Download the new AJAX search engine that
> > makes searching your log files as easy as surfing the web. DOWNLOAD
> > SPLUNK! http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> >_______________________________________________
> >Matplotlib-devel mailing list
> >Matplotlib-devel@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
> Ted Drain Jet Propulsion Laboratory ted.drain@...179...

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...143...
office: (607) 255-9894
fax: (607) 255-9001

Ted Drain Jet Propulsion Laboratory ted.drain@...179...