@@ -93,6 +93,7 @@ class Grid:
9393
9494 _defaultAxesClass = Axes
9595
96+ @cbook ._delete_parameter ("3.3" , "add_all" )
9697 def __init__ (self , fig ,
9798 rect ,
9899 nrows_ncols ,
@@ -128,6 +129,7 @@ def __init__(self, fig,
128129 inches.
129130 add_all : bool, default: True
130131 Whether to add the axes to the figure using `.Figure.add_axes`.
132+ This parameter is deprecated.
131133 share_all : bool, default: False
132134 Whether all axes share their x- and y-axis. Overrides *share_x*
133135 and *share_y*.
@@ -335,21 +337,15 @@ def get_axes_locator(self):
335337 return self ._divider .get_locator ()
336338
337339 def get_vsize_hsize (self ):
338-
339340 return self ._divider .get_vsize_hsize ()
340- # from axes_size import AddList
341-
342- # vsize = AddList(self._divider.get_vertical())
343- # hsize = AddList(self._divider.get_horizontal())
344-
345- # return vsize, hsize
346341
347342
348343class ImageGrid (Grid ):
349344 # docstring inherited
350345
351346 _defaultCbarAxesClass = CbarAxes
352347
348+ @cbook ._delete_parameter ("3.3" , "add_all" )
353349 def __init__ (self , fig ,
354350 rect ,
355351 nrows_ncols ,
@@ -388,6 +384,7 @@ def __init__(self, fig,
388384 inches.
389385 add_all : bool, default: True
390386 Whether to add the axes to the figure using `.Figure.add_axes`.
387+ This parameter is deprecated.
391388 share_all : bool, default: False
392389 Whether all axes share their x- and y-axis.
393390 aspect : bool, default: True
@@ -422,11 +419,18 @@ def __init__(self, fig,
422419 self ._colorbar_size = cbar_size
423420 # The colorbar axes are created in _init_locators().
424421
425- super ().__init__ (
426- fig , rect , nrows_ncols , ngrids ,
427- direction = direction , axes_pad = axes_pad , add_all = add_all ,
428- share_all = share_all , share_x = True , share_y = True , aspect = aspect ,
429- label_mode = label_mode , axes_class = axes_class )
422+ if add_all :
423+ super ().__init__ (
424+ fig , rect , nrows_ncols , ngrids ,
425+ direction = direction , axes_pad = axes_pad ,
426+ share_all = share_all , share_x = True , share_y = True , aspect = aspect ,
427+ label_mode = label_mode , axes_class = axes_class )
428+ else : # Only show deprecation in that case.
429+ super ().__init__ (
430+ fig , rect , nrows_ncols , ngrids ,
431+ direction = direction , axes_pad = axes_pad , add_all = add_all ,
432+ share_all = share_all , share_x = True , share_y = True , aspect = aspect ,
433+ label_mode = label_mode , axes_class = axes_class )
430434
431435 if add_all :
432436 for ax in self .cbar_axes :
0 commit comments