[matplotlib-devel] SpanSelector and figure.subplots_adjust

A challenge to the community! :wink:

Run the current cursor.py example with the TkAgg backend. (blitting
should be on)
i.e. python cursor.py -dTkAgg

Why does the blitting not update the entire axis? Any help on this is
greatly appreciated.



On 11/10/05, Charlie Moad <cwmoad@...287...> wrote:

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 = pylab.figure()
ax = fig.add_subplot(111)

def onselect(vmin, vmax):
聽聽聽聽print vmin, vmax

span = SpanSelector(ax, onselect, 'horizontal', useblit=True,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽rectprops=dict(alpha=0.5, facecolor='red') )


Adjust the subplot params then you will see the distortion. With 2
subplots the spanselector never visually appears, but the callback is


On 11/9/05, Charlie Moad <cwmoad@...287...> 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 <jdhunter@...4...> wrote:

> >
> > > I guess I should have mentioned TkAgg CVS. I didn't
> > > think the problem would be specific to a backend, so I
> > > didn't try any others. Also, when I have more than one
> > > subplot, nothing is drawn period.
> >
> > tkagg works for me, as do multiple subplots. Weird. I'm using
> > examples/span_selector.py. You too?
> >
> > JDH
> >