@@ -573,7 +573,8 @@ def get_constrained_layout_pads(self, relative=False):
573573
574574 return w_pad , h_pad , wspace , hspace
575575
576- def autofmt_xdate (self , bottom = 0.2 , rotation = 30 , ha = 'right' , which = None ):
576+ def autofmt_xdate (
577+ self , bottom = 0.2 , rotation = 30 , ha = 'right' , which = 'major' ):
577578 """
578579 Date ticklabels often overlap, so it is useful to rotate them
579580 and right align them. Also, a common use case is a number of
@@ -585,18 +586,19 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which=None):
585586 Parameters
586587 ----------
587588 bottom : scalar
588- The bottom of the subplots for :meth:`subplots_adjust`.
589-
589+ The bottom of the subplots for `subplots_adjust`.
590590 rotation : angle in degrees
591591 The rotation of the xtick labels.
592-
593592 ha : str
594593 The horizontal alignment of the xticklabels.
595-
596- which : {None, 'major', 'minor', 'both'}
597- Selects which ticklabels to rotate. Default is None which works
598- the same as major.
594+ which : {'major', 'minor', 'both'}, default: 'major'
595+ Selects which ticklabels to rotate.
599596 """
597+ if which is None :
598+ cbook .warn_deprecated (
599+ "3.3" , message = "Support for passing which=None to mean "
600+ "which='major' is deprecated since %(since)s and will be "
601+ "removed %(removal)s." )
600602 allsubplots = all (hasattr (ax , 'is_last_row' ) for ax in self .axes )
601603 if len (self .axes ) == 1 :
602604 for label in self .axes [0 ].get_xticklabels (which = which ):
0 commit comments