SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] QtAgg backend drawing everything twice?

From: Darren D. <dar...@co...> - 2008年03月14日 12:23:56
On Thursday 13 March 2008 05:02:36 pm Ted Drain wrote:
> I'm working on improving the plotting speed of one of our applications. As
> part of that, I was looking at how quickly the QtAgg backend is drawing. I
> added some print out's to the backend and noticed that it seems to be
> drawing everything twice. In the code:
>
> backend_qtagg.py: FigureCanvasQTAgg class:
>
> def draw( self ):
> """
> Draw the figure when xwindows is ready for the update
> """
>
> if DEBUG: print "FigureCanvasQtAgg.draw", self
> self.replot = True
> FigureCanvasAgg.draw(self)
> self.repaint( False )
>
>
>
> FigureCanvasAgg.draw() will cause a draw the repaint call will cause a
> draw. If I comment out the FCAgg.draw() call, my application (QtAgg
> embedded in a PyQt program) works fine. I've also run several of the
> various example scripts and they seem to work fine as well. Panning,
> zooming, redraws, resize, and file saving seem to be unaffected.
>
> Does anyone know why the extra draw call might be necessary?
Thank you for pointing this out, Ted. It actually solves a problem I was 
seeing with the qt4agg backend, where the widgets.Cursor crosshairs were not 
being drawn when blitting was disabled.
I removed the lines from qtagg and qt4agg, and saw no problems in the examples 
or my own application, so I checked in the changes - svn 5002.
Darren

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /