@@ -579,7 +579,8 @@ def get_constrained_layout_pads(self, relative=False):
579579
580580 return w_pad , h_pad , wspace , hspace
581581
582- def autofmt_xdate (self , bottom = 0.2 , rotation = 30 , ha = 'right' , which = None ):
582+ def autofmt_xdate (
583+ self , bottom = 0.2 , rotation = 30 , ha = 'right' , which = 'major' ):
583584 """
584585 Date ticklabels often overlap, so it is useful to rotate them
585586 and right align them. Also, a common use case is a number of
@@ -591,18 +592,19 @@ def autofmt_xdate(self, bottom=0.2, rotation=30, ha='right', which=None):
591592 Parameters
592593 ----------
593594 bottom : scalar
594- The bottom of the subplots for :meth:`subplots_adjust`.
595-
595+ The bottom of the subplots for `subplots_adjust`.
596596 rotation : angle in degrees
597597 The rotation of the xtick labels.
598-
599598 ha : str
600599 The horizontal alignment of the xticklabels.
601-
602- which : {None, 'major', 'minor', 'both'}
603- Selects which ticklabels to rotate. Default is None which works
604- the same as major.
600+ which : {'major', 'minor', 'both'}, default: 'major'
601+ Selects which ticklabels to rotate.
605602 """
603+ if which is None :
604+ cbook .warn_deprecated (
605+ "3.3" , message = "Support for passing which=None to mean "
606+ "which='major' is deprecated since %(since)s and will be "
607+ "removed %(removal)s." )
606608 allsubplots = all (hasattr (ax , 'is_last_row' ) for ax in self .axes )
607609 if len (self .axes ) == 1 :
608610 for label in self .axes [0 ].get_xticklabels (which = which ):
0 commit comments