File tree Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Expand file tree Collapse file tree 3 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ Interactive
35
35
Artist.pchanged
36
36
Artist.get_cursor_data
37
37
Artist.format_cursor_data
38
+ Artist.set_mouseover
39
+ Artist.get_mouseover
38
40
Artist.mouseover
39
41
Artist.contains
40
42
Artist.pick
Original file line number Diff line number Diff line change @@ -1295,20 +1295,29 @@ def format_cursor_data(self, data):
1295
1295
if isinstance (item , Number ))
1296
1296
return "[" + data_str + "]"
1297
1297
1298
- @property
1299
- def mouseover (self ):
1298
+ def get_mouseover (self ):
1300
1299
"""
1301
- If this property is set to *True*, the artist will be queried for
1302
- custom context information when the mouse cursor moves over it.
1303
-
1304
- See also :meth:`get_cursor_data`, :class:`.ToolCursorPosition` and
1305
- :class:`.NavigationToolbar2`.
1300
+ Return whether this artist is queried for custom context information
1301
+ when the mouse cursor moves over it.
1306
1302
"""
1307
1303
return self ._mouseover
1308
1304
1309
- @mouseover .setter
1310
- def mouseover (self , val ):
1311
- val = bool (val )
1305
+ def set_mouseover (self , mouseover ):
1306
+ """
1307
+ Set whether this artist is queried for custom context information when
1308
+ the mouse cursor moves over it.
1309
+
1310
+ Parameters
1311
+ ----------
1312
+ mouseover : bool
1313
+
1314
+ See Also
1315
+ --------
1316
+ get_cursor_data
1317
+ .ToolCursorPosition
1318
+ .NavigationToolbar2
1319
+ """
1320
+ val = bool (mouseover )
1312
1321
self ._mouseover = val
1313
1322
ax = self .axes
1314
1323
if ax :
@@ -1317,6 +1326,8 @@ def mouseover(self, val):
1317
1326
else :
1318
1327
ax ._mouseover_set .discard (self )
1319
1328
1329
+ mouseover = property (get_mouseover , set_mouseover ) # backcompat.
1330
+
1320
1331
1321
1332
def _get_tightbbox_for_layout_only (obj , * args , ** kwargs ):
1322
1333
"""
Original file line number Diff line number Diff line change @@ -1103,7 +1103,7 @@ def _set_artist_props(self, a):
1103
1103
a .set_transform (self .transData )
1104
1104
1105
1105
a .axes = self
1106
- if a .mouseover :
1106
+ if a .get_mouseover () :
1107
1107
self ._mouseover_set .add (a )
1108
1108
1109
1109
def _gen_axes_patch (self ):
You can’t perform that action at this time.
0 commit comments