SpanSelector span_stays does not work for me

I sent the original message to the source forge mailing list. Woops.
Thanks for the response anyways.

The span stays highlighted when I set useblit=False. The performance hit
isn't too bad, and I will stay with this option for the moment.

*** Response ***

Have you tried setting "useblit=False"? If that works, I wonder if we
accidentally broke something in the recent widget interactivity work...

Ben Root

*** Original Message ***

I am selecting a region of a color plot with span selector, and I would
like the selected region to stay highlighted. I found the span_stays
flag, but the selection rectangle still disappears after I release the
mouse.

Any help is appreciated.
Thanks,
Ned

My backend is 'TkAgg'

I am running the script from python3.4 at the command line, my version is:

Python 3.4.3 (default, Jun 19 2015, 05:46:30)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.

print(matplotlib.__version__)
1.5.0

code example:

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

test_data = np.random.randn(1000, 1000)
fig, ax = plt.subplots()
ax.imshow(test_data)

def selection(x1, x2):
     """This function isn't the point"""
     pass

span = SpanSelector(ax, selection, 'horizontal', useblit=True,
                     rectprops=dict(alpha=0.5, facecolor='red'),
span_stays=True)
plt.show()

Good to know that you have a work-around. Do you mind filing a bug report
on this?

···

On Mon, Dec 14, 2015 at 5:23 PM, Edward Richards <edwardlrichards at gmail.com> wrote:

I sent the original message to the source forge mailing list. Woops.
Thanks for the response anyways.

The span stays highlighted when I set useblit=False. The performance hit
isn't too bad, and I will stay with this option for the moment.

*** Response ***

Have you tried setting "useblit=False"? If that works, I wonder if we
accidentally broke something in the recent widget interactivity work...

Ben Root

*** Original Message ***

I am selecting a region of a color plot with span selector, and I would
like the selected region to stay highlighted. I found the span_stays flag,
but the selection rectangle still disappears after I release the mouse.

Any help is appreciated.
Thanks,
Ned

My backend is 'TkAgg'

I am running the script from python3.4 at the command line, my version is:

Python 3.4.3 (default, Jun 19 2015, 05:46:30)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.

print(matplotlib.__version__)
1.5.0

code example:

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

test_data = np.random.randn(1000, 1000)
fig, ax = plt.subplots()
ax.imshow(test_data)

def selection(x1, x2):
    """This function isn't the point"""
    pass

span = SpanSelector(ax, selection, 'horizontal', useblit=True,
                    rectprops=dict(alpha=0.5, facecolor='red'),
span_stays=True)
plt.show()
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
https://mail.python.org/mailman/listinfo/matplotlib-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20151214/06892c49/attachment.html>