@@ -155,14 +155,26 @@ def key_event(self):
155
155
self .mouse_event_add (event )
156
156
157
157
def mouse_event_add (self , event ):
158
- """Process an button-1 event (add a click if inside axes)."""
158
+ """
159
+ Process an button-1 event (add a click if inside axes).
160
+
161
+ Parameters
162
+ ----------
163
+ event : ~.backend_bases.MouseEvent
164
+ """
159
165
if event .inaxes :
160
166
self .add_click (event )
161
167
else : # If not a valid click, remove from event list.
162
168
BlockingInput .pop (self )
163
169
164
170
def mouse_event_stop (self , event ):
165
- """Process an button-2 event (end blocking input)."""
171
+ """
172
+ Process an button-2 event (end blocking input).
173
+
174
+ Parameters
175
+ ----------
176
+ event : ~.backend_bases.MouseEvent
177
+ """
166
178
# Remove last event just for cleanliness.
167
179
BlockingInput .pop (self )
168
180
# This will exit even if not in infinite mode. This is consistent with
@@ -171,15 +183,27 @@ def mouse_event_stop(self, event):
171
183
self .fig .canvas .stop_event_loop ()
172
184
173
185
def mouse_event_pop (self , event ):
174
- """Process an button-3 event (remove the last click)."""
186
+ """
187
+ Process an button-3 event (remove the last click).
188
+
189
+ Parameters
190
+ ----------
191
+ event : ~.backend_bases.MouseEvent
192
+ """
175
193
# Remove this last event.
176
194
BlockingInput .pop (self )
177
195
# Now remove any existing clicks if possible.
178
196
if self .events :
179
197
self .pop (event )
180
198
181
199
def add_click (self , event ):
182
- """Add the coordinates of an event to the list of clicks."""
200
+ """
201
+ Add the coordinates of an event to the list of clicks.
202
+
203
+ Parameters
204
+ ----------
205
+ event : ~.backend_bases.MouseEvent
206
+ """
183
207
self .clicks .append ((event .xdata , event .ydata ))
184
208
_log .info ("input %i: %f, %f" ,
185
209
len (self .clicks ), event .xdata , event .ydata )
@@ -192,7 +216,13 @@ def add_click(self, event):
192
216
self .fig .canvas .draw ()
193
217
194
218
def pop_click (self , event , index = - 1 ):
195
- """Remove a click (by default, the last) from the list of clicks."""
219
+ """
220
+ Remove a click (by default, the last) from the list of clicks.
221
+
222
+ Parameters
223
+ ----------
224
+ event : ~.backend_bases.MouseEvent
225
+ """
196
226
self .clicks .pop (index )
197
227
if self .show_clicks :
198
228
self .marks .pop (index ).remove ()
@@ -208,6 +238,12 @@ def pop(self, event, index=-1):
208
238
BlockingInput .pop (self , index )
209
239
210
240
def cleanup (self , event = None ):
241
+ """
242
+ Parameters
243
+ ----------
244
+ event : ~.backend_bases.MouseEvent
245
+ Not used
246
+ """
211
247
# Clean the figure.
212
248
if self .show_clicks :
213
249
for mark in self .marks :
0 commit comments