@@ -383,7 +383,7 @@ def _default_contains(self, mouseevent, figure=None):
383383 """
384384 Base impl. for checking whether a mouseevent happened in an artist.
385385
386- 1. If the artist defines a custom checker, use it.
386+ 1. If the artist defines a custom checker, use it (deprecated) .
387387 2. If the artist figure is known and the event did not occur in that
388388 figure (by checking its ``canvas`` attribute), reject it.
389389 3. Otherwise, return `None, {}`, indicating that the subclass'
@@ -396,7 +396,7 @@ def _default_contains(self, mouseevent, figure=None):
396396 return inside, info
397397 # subclass-specific implementation follows
398398
399- The `canvas` kwarg is provided for the implementation of
399+ The *figure* kwarg is provided for the implementation of
400400 `Figure.contains`.
401401 """
402402 if callable (self ._contains ):
@@ -406,7 +406,8 @@ def _default_contains(self, mouseevent, figure=None):
406406 return None , {}
407407
408408 def contains (self , mouseevent ):
409- """Test whether the artist contains the mouse event.
409+ """
410+ Test whether the artist contains the mouse event.
410411
411412 Parameters
412413 ----------
@@ -420,17 +421,14 @@ def contains(self, mouseevent):
420421 An artist-specific dictionary of details of the event context,
421422 such as which points are contained in the pick radius. See the
422423 individual Artist subclasses for details.
423-
424- See Also
425- --------
426- set_contains, get_contains
427424 """
428425 inside , info = self ._default_contains (mouseevent )
429426 if inside is not None :
430427 return inside , info
431428 _log .warning ("%r needs 'contains' method" , self .__class__ .__name__ )
432429 return False , {}
433430
431+ @cbook .deprecated ("3.3" , alternative = "set_picker" )
434432 def set_contains (self , picker ):
435433 """
436434 Define a custom contains test for the artist.
@@ -458,6 +456,7 @@ def contains(artist: Artist, event: MouseEvent) -> bool, dict
458456 raise TypeError ("picker is not a callable" )
459457 self ._contains = picker
460458
459+ @cbook .deprecated ("3.3" , alternative = "get_picker" )
461460 def get_contains (self ):
462461 """
463462 Return the custom contains function of the artist if set, or *None*.
0 commit comments