Skip to content

Commit 0c06766

Browse files
committed
Fix deprecated attribute and add new feature entry
1 parent 9d5f71f commit 0c06766

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Setting artist properties of selectors
2+
--------------------------------------
3+
4+
The artist properties of selectors can be changed using the ``set_props`` and
5+
``set_handle_props`` methods.

lib/matplotlib/widgets.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,7 +2180,9 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False,
21802180
# prev attribute is deprecated but we still need to maintain it
21812181
self._prev = (0, 0)
21822182

2183-
rect = _api.deprecate_privatize_attribute("3.5")
2183+
rect = _api.deprecated("3.5")(
2184+
property(lambda self: self.artists[0])
2185+
)
21842186

21852187
rectprops = _api.deprecated("3.5")(
21862188
property(lambda self: self._props)
@@ -2842,7 +2844,9 @@ def __init__(self, ax, onselect, drawtype='box',
28422844

28432845
self._extents_on_press = None
28442846

2845-
to_draw = _api.deprecate_privatize_attribute("3.5")
2847+
to_draw = _api.deprecated("3.5")(
2848+
property(lambda self: self.artists[0])
2849+
)
28462850

28472851
drawtype = _api.deprecate_privatize_attribute("3.5")
28482852

@@ -3371,6 +3375,10 @@ def __init__(self, ax, onselect, useblit=False,
33713375
self._artists = [line] + list(self._handles_artists)
33723376
self.set_visible(True)
33733377

3378+
line = _api.deprecated("3.5")(
3379+
property(lambda self: self.artists[0])
3380+
)
3381+
33743382
vertex_select_radius = _api.deprecated("3.5", name="vertex_select_radius",
33753383
alternative="grab_range")(
33763384
property(lambda self: self.grab_range,

0 commit comments

Comments
 (0)