On Mon, Nov 30, 2009 at 7:01 PM, Laurent Dufrechou <laurent.dufrec...@gmail.com> wrote: > Hi there, > > Finally with lot of try I've finally managed to make blitting of a cmap > working. > I've also patched QT4agg backend, to make a redraw immediately. > (replaced self.draw by self.repaint) > In my current project I was able to stream a 655KB network stream, do > demodulation of an IQ stream and display the spectrogram in real time (4096 > pixel per 1024) with matplotlib and QT4 backend, thx to the patch + blitting > example attached. > > Without patch, the refrech was veeery long. (waiting for QT loop to execute > code wen it wanted.) > And do NOT always work. If you've got a powerfull pc you've got chance to > see only white background... > (or simply the loop timer to 0, you will see that without patch blit does > not work). > > Only tested under windows currently, 'cause my project is on windows > currently... > > There is one bug in the example, that I didn't manage to correct yet. > Depending on screen resolution, the color of the cmap blitted area can be > kind of alpha'ed. (that is look like a little bit transparent...) , Any idea > on the root of this issue? > > By the way to make the example work I needed to do this: > self.ax2.draw_artist(self.line2) > self.blit(self.ax2.bbox) > self.restore_region(self.background2) > > that is blit before restore... don't understand why yet. > > Any comment welcomed. > > Is there any chance, after review, to find a way to include this in main > trunk? > What do think about this?
I'm not able to comment on the other questions you raised, but the change to backend_qt4agg.py improved the behavior of the existing qt4 blit example (without your changes the axes labels were not drawn on my machine), so I checked the change into the trunk. Thank you! Darren ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users