@@ -4208,60 +4208,36 @@ def format_deltas(key, dx, dy):
4208
4208
self .set_ylim (points [:, 1 ])
4209
4209
4210
4210
def get_children (self ):
4211
- """return a list of child artists"""
4212
- children = []
4213
- children .extend (self .collections )
4214
- children .extend (self .patches )
4215
- children .extend (self .lines )
4216
- children .extend (self .texts )
4217
- children .extend (self .artists )
4218
- children .extend (self .spines .values ())
4219
- children .append (self .xaxis )
4220
- children .append (self .yaxis )
4221
- children .append (self .title )
4222
- children .append (self ._left_title )
4223
- children .append (self ._right_title )
4224
- children .extend (self .tables )
4225
- children .extend (self .images )
4226
- children .extend (self .child_axes )
4227
-
4228
- if self .legend_ is not None :
4229
- children .append (self .legend_ )
4230
- children .append (self .patch )
4231
-
4232
- return children
4211
+ # docstring inherited.
4212
+ return [
4213
+ * self .collections ,
4214
+ * self .patches ,
4215
+ * self .lines ,
4216
+ * self .texts ,
4217
+ * self .artists ,
4218
+ * self .spines .values (),
4219
+ * self ._get_axis_list (),
4220
+ self .title , self ._left_title , self ._right_title ,
4221
+ * self .tables ,
4222
+ * self .images ,
4223
+ * self .child_axes ,
4224
+ * ([self .legend_ ] if self .legend_ is not None else []),
4225
+ self .patch ,
4226
+ ]
4233
4227
4234
4228
def contains (self , mouseevent ):
4235
- """
4236
- Test whether the mouse event occurred in the axes.
4237
-
4238
- Returns *True* / *False*, {}
4239
- """
4229
+ # docstring inherited.
4240
4230
if callable (self ._contains ):
4241
4231
return self ._contains (self , mouseevent )
4242
4232
return self .patch .contains (mouseevent )
4243
4233
4244
4234
def contains_point (self , point ):
4245
4235
"""
4246
- Returns *True* if the point (tuple of x,y) is inside the axes
4247
- (the area defined by the its patch). A pixel coordinate is
4248
- required.
4249
-
4236
+ Returns whether *point* (pair of pixel coordinates) is inside the axes
4237
+ patch.
4250
4238
"""
4251
4239
return self .patch .contains_point (point , radius = 1.0 )
4252
4240
4253
- def pick (self , * args ):
4254
- """Trigger pick event
4255
-
4256
- Call signature::
4257
-
4258
- pick(mouseevent)
4259
-
4260
- each child artist will fire a pick event if mouseevent is over
4261
- the artist and the artist has picker set
4262
- """
4263
- martist .Artist .pick (self , args [0 ])
4264
-
4265
4241
def get_default_bbox_extra_artists (self ):
4266
4242
"""
4267
4243
Return a default list of artists that are used for the bounding box
@@ -4285,7 +4261,7 @@ def get_default_bbox_extra_artists(self):
4285
4261
if (artist .get_visible () and artist .get_in_layout ())]
4286
4262
4287
4263
def get_tightbbox (self , renderer , call_axes_locator = True ,
4288
- bbox_extra_artists = None ):
4264
+ bbox_extra_artists = None ):
4289
4265
"""
4290
4266
Return the tight bounding box of the axes, including axis and their
4291
4267
decorators (xlabel, title, etc).
0 commit comments