@@ -530,12 +530,17 @@ def new_horizontal(self, size, pad=None, pack_start=False, **kwargs):
530530 If False, the new axes is appended at the end
531531 of the list, i.e., it became the right-most axes. If True, it is
532532 inserted at the start of the list, and becomes the left-most axes.
533- kwargs
533+ ** kwargs
534534 All extra keywords arguments are passed to the created axes.
535535 If *axes_class* is given, the new axes will be created as an
536536 instance of the given class. Otherwise, the same class of the
537537 main axes will be used.
538538 """
539+ if pad is None :
540+ cbook .warn_deprecated (
541+ "3.2" , message = "In a future version, 'pad' will default to "
542+ "rcParams['figure.subplot.wspace']. Set pad=0 to keep the "
543+ "old behavior." )
539544 if pad :
540545 if not isinstance (pad , Size ._Base ):
541546 pad = Size .from_any (pad , fraction_ref = self ._xref )
@@ -574,12 +579,17 @@ def new_vertical(self, size, pad=None, pack_start=False, **kwargs):
574579 If False, the new axes is appended at the end
575580 of the list, i.e., it became the right-most axes. If True, it is
576581 inserted at the start of the list, and becomes the left-most axes.
577- kwargs
582+ ** kwargs
578583 All extra keywords arguments are passed to the created axes.
579584 If *axes_class* is given, the new axes will be created as an
580585 instance of the given class. Otherwise, the same class of the
581586 main axes will be used.
582587 """
588+ if pad is None :
589+ cbook .warn_deprecated (
590+ "3.2" , message = "In a future version, 'pad' will default to "
591+ "rcParams['figure.subplot.hspace']. Set pad=0 to keep the "
592+ "old behavior." )
583593 if pad :
584594 if not isinstance (pad , Size ._Base ):
585595 pad = Size .from_any (pad , fraction_ref = self ._yref )
0 commit comments