Skip to content

Deprecate Artist.onRemove, Artist.hitlist. #9825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/api/api_changes/2017-11-23-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Deprecations
````````````

The unused and untested ``Artist.onRemove`` and ``Artist.hitlist`` methods have
been deprecated.
1 change: 0 additions & 1 deletion doc/api/artist_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Interactive
Artist.get_contains
Artist.get_cursor_data
Artist.get_picker
Artist.hitlist
Artist.mouseover
Artist.pchanged
Artist.pick
Expand Down
1 change: 0 additions & 1 deletion doc/api/axes_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ Interactive
Axes.format_xdata
Axes.format_ydata

Axes.hitlist
Axes.mouseover
Axes.in_axes

Expand Down
6 changes: 0 additions & 6 deletions doc/api/axis_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,6 @@ Ticks
Tick.get_window_extent
Tick.get_zorder
Tick.have_units
Tick.hitlist
Tick.is_transform_set
Tick.mouseover
Tick.pchanged
Expand Down Expand Up @@ -569,7 +568,6 @@ Ticks
XTick.get_window_extent
XTick.get_zorder
XTick.have_units
XTick.hitlist
XTick.is_transform_set
XTick.mouseover
XTick.pchanged
Expand Down Expand Up @@ -636,7 +634,6 @@ Ticks
YTick.get_window_extent
YTick.get_zorder
YTick.have_units
YTick.hitlist
YTick.is_transform_set
YTick.mouseover
YTick.pchanged
Expand Down Expand Up @@ -713,7 +710,6 @@ Axis
Axis.get_window_extent
Axis.get_zorder
Axis.have_units
Axis.hitlist
Axis.is_transform_set
Axis.mouseover
Axis.pchanged
Expand Down Expand Up @@ -780,7 +776,6 @@ Axis
XAxis.get_window_extent
XAxis.get_zorder
XAxis.have_units
XAxis.hitlist
XAxis.is_transform_set
XAxis.mouseover
XAxis.pchanged
Expand Down Expand Up @@ -847,7 +842,6 @@ Axis
YAxis.get_window_extent
YAxis.get_zorder
YAxis.have_units
YAxis.hitlist
YAxis.is_transform_set
YAxis.mouseover
YAxis.pchanged
Expand Down
4 changes: 2 additions & 2 deletions examples/user_interfaces/fourier_demo_wx_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def sizeHandler(self, *args, **kwargs):
self.canvas.SetSize(self.GetSize())

def mouseDown(self, evt):
if self.lines[0] in self.figure.hitlist(evt):
if self.lines[0].contains(evt)[0]:
self.state = 'frequency'
elif self.lines[1] in self.figure.hitlist(evt):
elif self.lines[1].contains(evt)[0]:
self.state = 'time'
else:
self.state = ''
Expand Down
1 change: 1 addition & 0 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def get_transform(self):
self._transform = self._transform._as_mpl_transform(self.axes)
return self._transform

@cbook.deprecated("2.2")
def hitlist(self, event):
"""
List the children of the artist which contain the mouse event *event*.
Expand Down
1 change: 1 addition & 0 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,7 @@ def is_saving(self):
"""
return self._is_saving

@cbook.deprecated("2.2")
def onRemove(self, ev):
"""
Mouse event processor which removes the top artist
Expand Down