Hello,
Attached is a script that when run from ipython --pylab with your
backend setup for 'QtAgg' reproduces a bug I am seeing. If you run the
plot, you'll see a line plotted in blue as expected. Then when the
same figure is updated by blitting, the line turns red. I tried this
with green and it stayed green, but yellow went to cyan. It seems that
the byteswapping that is necessary for displaying colors correctly in
Qt is happening during a normal plot, but not when blitting. I tried
going through the code to determine the problem, I can only guess that
it lies somewhere in the FigureCanvasQTAgg.paintEvent, since that's
where I see to_ARGB etc.
Sorry I couldn't locate the bug precisely, I find it very difficult to
thread my way through all the backend classes.
Glenn
import matplotlib
matplotlib.use('QtAgg')
import pylab
import time

pylab.ion()

f = pylab.figure()
ax = f.add_subplot(111)
line, = ax.plot([1,2,3])
pylab.show()
time.sleep(1)
bbox = f.bbox
bg = f.canvas.copy_from_bbox(bbox)
time.sleep(1)
f.canvas.restore_region(bg)
time.sleep(1)
line.set_ydata([3,2,1])
ax.draw_artist(line)
f.canvas.blit(bbox)
time.sleep(1)
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to