@@ -1114,13 +1114,46 @@ def matchfunc(x):
11141114
11151115 def get_cursor_data (self , event ):
11161116 """
1117- Get the cursor data for a given event.
1117+ Return the cursor data for a given event.
1118+
1119+ .. note::
1120+ This method is intended to be overridden by artist subclasses
1121+ (or monkeypatched). As an end-user of Matplotlib you will most
1122+ likely not call this method yourself.
1123+
1124+ Cursor data can be used by Artists to provide additional context
1125+ information for a given event. The default implementation just returns
1126+ *None*.
1127+
1128+ Subclasses can override the method and return arbitrary data. However,
1129+ when doing so, they must ensure that `.format_cursor_data` can convert
1130+ the data to a string representation.
1131+
1132+ The only current use case is displaying the z-value of an `.AxesImage`
1133+ in the status bar of a plot window, while moving the mouse.
1134+
1135+ See Also
1136+ --------
1137+ format_cursor_data
1138+
11181139 """
11191140 return None
11201141
11211142 def format_cursor_data (self , data ):
11221143 """
1123- Return *cursor data* string formatted.
1144+ Return a string representation of *data*.
1145+
1146+ .. note::
1147+ This method is intended to be overridden by artist subclasses
1148+ (or monkeypatched). As an end-user of Matplotlib you will most
1149+ likely not call this method yourself.
1150+
1151+ The default implementation converts ints and floats and arrays of ints
1152+ and floats into a comma-separated string enclosed in square brackets.
1153+
1154+ See Also
1155+ --------
1156+ get_cursor_data
11241157 """
11251158 try :
11261159 data [0 ]
0 commit comments