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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to