From: Laurent D. <lau...@gm...> - 2009-12-01 00:02:10
|
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? Cheers, Laurent |