File tree 3 files changed +25
-13
lines changed
3 files changed +25
-13
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,28 +1295,38 @@ 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 )
1312
- self ._mouseover = 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
+ self ._mouseover = bool (mouseover )
1313
1321
ax = self .axes
1314
1322
if ax :
1315
- if val :
1323
+ if self . _mouseover :
1316
1324
ax ._mouseover_set .add (self )
1317
1325
else :
1318
1326
ax ._mouseover_set .discard (self )
1319
1327
1328
+ mouseover = property (get_mouseover , set_mouseover ) # backcompat.
1329
+
1320
1330
1321
1331
def _get_tightbbox_for_layout_only (obj , * args , ** kwargs ):
1322
1332
"""
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