def autofmt_xdate(self, bottom=<NUM_LIT>, rotation=<NUM_LIT:30>, ha='<STR_LIT:right>'):
allsubplots = np.alltrue([hasattr(ax, '<STR_LIT>') for ax in self.axes])<EOL>if len(self.axes)==<NUM_LIT:1>:<EOL><INDENT>for label in ax.get_xticklabels():<EOL><INDENT>label.set_ha(ha)<EOL>label.set_rotation(rotation)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if allsubplots:<EOL><INDENT>for ax in self.get_axes():<EOL><INDENT>if ax.is_last_row():<EOL><INDENT>for label in ax.get_xticklabels():<EOL><INDENT>label.set_ha(ha)<EOL>label.set_rotation(rotation)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for label in ax.get_xticklabels():<EOL><INDENT>label.set_visible(False)<EOL><DEDENT>ax.set_xlabel('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if allsubplots:<EOL><INDENT>self.subplots_adjust(bottom=bottom)<EOL><DEDENT>
Date ticklabels often overlap, so it is useful to rotate them
and right align them.  Also, a common use case is a number of
subplots with shared xaxes where the x-axis is date data.  The
ticklabels are often long, and it helps to rotate them on the
bottom subplot and turn them off on other subplots, as well as
turn off xlabels.

*bottom*
    the bottom of the subplots for :meth:`subplots_adjust`
*rotation*
    the rotation of the xtick labels
*ha*
    the horizontal alignment of the xticklabels