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