From: Charlie M. <cw...@gm...> - 2005-11-10 20:02:24
|
So this happens with TkAgg and blitting. Here is the sample script: #!/usr/bin/env python import matplotlib; matplotlib.use('TkAgg') import pylab from matplotlib.widgets import SpanSelector fig =3D pylab.figure() ax =3D fig.add_subplot(111) ax.plot(pylab.rand(100)) def onselect(vmin, vmax): print vmin, vmax span =3D SpanSelector(ax, onselect, 'horizontal', useblit=3DTrue, rectprops=3Ddict(alpha=3D0.5, facecolor=3D'red') ) pylab.show() Adjust the subplot params then you will see the distortion. With 2 subplots the spanselector never visually appears, but the callback is called. Thanks, Charlie On 11/9/05, Charlie Moad <cw...@gm...> wrote: > I will have to do more testing, but I am calling > figure.subplots_adjust, not adjusting with the widget. This is also > through the oo interface. I will try to write a sample script and get > back to the list. > > Thanks, > > On 11/9/05, John Hunter <jdh...@ac...> wrote: > > >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes: > > > > Charlie> I guess I should have mentioned TkAgg CVS. I didn't > > Charlie> think the problem would be specific to a backend, so I > > Charlie> didn't try any others. Also, when I have more than one > > Charlie> subplot, nothing is drawn period. > > > > tkagg works for me, as do multiple subplots. Weird. I'm using > > examples/span_selector.py. You too? > > > > JDH > > > |