@@ -404,8 +404,8 @@ def legend(self, *args, **kwargs):
404404 def _remove_legend (self , legend ):
405405 self .legend_ = None
406406
407- def inset_axes (self , bounds , * , transform = None , zorder = 5 ,
408- ** kwargs ):
407+ def inset_axes (self , bounds , * ,
408+ transform = None , zorder = 5 , label = 'inset_axes' , ** kwargs ):
409409 """
410410 Add a child inset axes to this existing axes.
411411
@@ -428,7 +428,7 @@ def inset_axes(self, bounds, *, transform=None, zorder=5,
428428 parent axes.
429429
430430 **kwargs
431- Other keyword arguments are passed on to the `.Axes` child axes .
431+ Other keyword arguments are passed on to the child `.Axes`.
432432
433433 Returns
434434 -------
@@ -449,14 +449,13 @@ def inset_axes(self, bounds, *, transform=None, zorder=5,
449449 """
450450 if transform is None :
451451 transform = self .transAxes
452- label = kwargs .pop ('label' , 'inset_axes' )
453452
454453 # This puts the rectangle into figure-relative coordinates.
455454 inset_locator = _make_inset_locator (bounds , transform , self )
456455 bb = inset_locator (None , None )
457456
458- inset_ax = Axes (self .figure , bb .bounds , zorder = zorder ,
459- label = label , ** kwargs )
457+ inset_ax = Axes (self .figure , bb .bounds , zorder = zorder , label = label ,
458+ ** kwargs )
460459
461460 # this locator lets the axes move if in data coordinates.
462461 # it gets called in `ax.apply_aspect() (of all places)
@@ -467,8 +466,8 @@ def inset_axes(self, bounds, *, transform=None, zorder=5,
467466 return inset_ax
468467
469468 def indicate_inset (self , bounds , inset_ax = None , * , transform = None ,
470- facecolor = 'none' , edgecolor = '0.5' , alpha = 0.5 ,
471- zorder = 4.99 , ** kwargs ):
469+ facecolor = 'none' , edgecolor = '0.5' , alpha = 0.5 ,
470+ zorder = 4.99 , label = 'indicate_inset' , ** kwargs ):
472471 """
473472 Add an inset indicator to the axes. This is a rectangle on the plot
474473 at the position indicated by *bounds* that optionally has lines that
@@ -478,7 +477,6 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
478477 --------
479478 This method is experimental as of 3.0, and the API may change.
480479
481-
482480 Parameters
483481 ----------
484482 bounds : [x0, y0, width, height]
@@ -510,7 +508,9 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
510508 (just below the default level of inset axes).
511509
512510 **kwargs
513- Other keyword arguments are passed on to the rectangle patch.
511+ Other keyword arguments are passed on to the `.Rectangle` patch:
512+
513+ %(Rectangle)s
514514
515515 Returns
516516 -------
@@ -530,13 +530,12 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
530530
531531 if transform is None :
532532 transform = self .transData
533- label = kwargs .pop ('label' , 'indicate_inset' )
534533
535534 x , y , width , height = bounds
536535 rectangle_patch = mpatches .Rectangle (
537536 (x , y ), width , height ,
538537 facecolor = facecolor , edgecolor = edgecolor , alpha = alpha ,
539- zorder = zorder , label = label , transform = transform , ** kwargs )
538+ zorder = zorder , label = label , transform = transform , ** kwargs )
540539 self .add_patch (rectangle_patch )
541540
542541 connects = []
0 commit comments