SpanSelector and figure.subplots_adjust

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

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@...5...> 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

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)

ax.plot(pylab.rand(100))
def onselect(vmin, vmax):
    print vmin, vmax

span = SpanSelector(ax, onselect, 'horizontal', useblit=True,
                    rectprops=dict(alpha=0.5, facecolor='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 <cwmoad@...149...> 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@...5...> 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
>

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.

Thanks,
     Charlie

···

On 11/10/05, Charlie Moad <cwmoad@...149...> 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)

ax.plot(pylab.rand(100))
def onselect(vmin, vmax):
    print vmin, vmax

span = SpanSelector(ax, onselect, 'horizontal', useblit=True,
                    rectprops=dict(alpha=0.5, facecolor='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 <cwmoad@...149...> 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@...5...> 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
> >
>