On Monday 19 May 2008 03:36:01 am G Jones wrote:
> Hello,
> I am experiencing a bug when trying to blit a canvas that contains two
> axes, one with a line plot and the other with an imshow plot. The
> attached example, QtBlitBugDemo.py demonstrates the problem. As is, on
> my machine, the
> imshow plot updates correctly, but the line plot acts like the
> background is not being restored correctly, the lines keep piling up
> on top of each other, even though I am explicitly restoring a clean
> background before drawing the artist. If I simply comment out the
> line:
>        self.specPlotB.draw_artist(self.specArtistB)
> which draws the imshow artist, the line plot behaves correctly.
> I haven't been able to figure out what is causing this behavior.
> I am using r5186 from the SVN. The output from running with debug mode
> on is below.

I'm not convinced this is a bug in matplotlib. The following example works:

import matplotlib
matplotlib.use('qt4agg')

from matplotlib import widgets
from matplotlib import pyplot as plt
import numpy as np

ax=plt.axes()
cursor = widgets.Cursor(ax, useblit=True)
ax.imshow(np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]), cmap=plt.cm.jet,
interpolation='nearest')
plt.show()

I can't follow your example. It would be better to submit a single script with 
as simple an example as possible that illustrates the problem. Maybe you 
could have a look at matplotlib.widgets.Cursor to get some ideas of how to 
structure your code.

Darren 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to