8000 Merge pull request #9825 from anntzer/more-deprecations · matplotlib/matplotlib@6336f2d · GitHub
[go: up one dir, main page]

Skip to content

Commit 6336f2d

Browse files
authored
Merge pull request #9825 from anntzer/more-deprecations
API: Deprecate Artist.onRemove, Artist.hitlist.
2 parents 5392f2e + a2caa86 commit 6336f2d

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

doc/api/api_changes/2017-11-23-AL.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecations
2+
````````````
3+
4+
The unused and untested ``Artist.onRemove`` and ``Artist.hitlist`` methods have
5+
been deprecated.

doc/api/artist_api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Interactive
3434
Artist.get_contains
3535
Artist.get_cursor_data
3636
Artist.get_picker
37-
Artist.hitlist
3837
Artist.mouseover
3938
Artist.pchanged
4039
Artist.pick

doc/api/axes_api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ Interactive
498498
Axes.format_xdata
499499
Axes.format_ydata
500500

501-
Axes.hitlist
502501
Axes.mouseover
503502
Axes.in_axes
504503

doc/api/axis_api.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ Ticks
502502
Tick.get_window_extent
503503
Tick.get_zorder
504504
Tick.have_units
505-
Tick.hitlist
506505
Tick.is_transform_set
507506
Tick.mouseover
508507
Tick.pchanged
@@ -569,7 +568,6 @@ Ticks
569568
XTick.get_window_extent
570569
XTick.get_zorder
571570
XTick.have_units
572-
XTick.hitlist
573571
XTick.is_transform_set
574572
XTick.mouseover
575573
XTick.pchanged
@@ -636,7 +634,6 @@ Ticks
636634
YTick.get_window_extent
637635
YTick.get_zorder
638636
YTick.have_units
639-
YTick.hitlist
640637
YTick.is_transform_set
641638
YTick.mouseover
642639
YTick.pchanged
@@ -713,7 +710,6 @@ Axis
713710
Axis.get_window_extent
714711
Axis.get_zorder
715712
Axis.have_units
716-
Axis.hitlist
717713
Axis.is_transform_set
718714
Axis.mouseover
719715
Axis.pchanged
@@ -780,7 +776,6 @@ Axis
780776
XAxis.get_window_extent
781777
XAxis.get_zorder
782778
XAxis.have_units
783-
XAxis.hitlist
784779
XAxis.is_transform_set
785780
XAxis.mouseover
786781
XAxis.pchanged
@@ -847,7 +842,6 @@ Axis
847842
YAxis.get_window_extent
848843
YAxis.get_zorder
849844
YAxis.have_units
850-
YAxis.hitlist
851845
YAxis.is_transform_set
852846
YAxis.mouseover
853847
YAxis.pchanged

examples/user_interfaces/fourier_demo_wx_sgskip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ def sizeHandler(self, *args, **kwargs):
160160
self.canvas.SetSize(self.GetSize())
161161

162162
def mouseDown(self, evt):
163-
if self.lines[0] in self.figure.hitlist(evt):
163+
if self.lines[0].contains(evt)[0]:
164164
self.state = 'frequency'
165-
elif self.lines[1] in self.figure.hitlist(evt):
165+
elif self.lines[1].contains(evt)[0]:
166166
self.state = 'time'
167167
else:
168168
self.state = ''

lib/matplotlib/artist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def get_transform(self):
327327
self._transform = self._transform._as_mpl_transform(self.axes)
328328
return self._transform
329329

330+
@cbook.deprecated("2.2")
330331
def hitlist(self, event):
331332
"""
332333
List the children of the artist which contain the mouse event *event*.

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,7 @@ def is_saving(self):
18041804
"""
18051805
return self._is_saving
18061806

1807+
@cbook.deprecated("2.2")
18071808
def onRemove(self, ev):
18081809
"""
18091810
Mouse event processor which removes the top artist

0 commit comments

Comments
 (0)
0