code: def format_x_tick(axis,
                    major_locator=None,
                    major_formatter=None,
                    minor_locator=None,
                    minor_formatter=None):
      
      if major_locator:
          axis.xaxis.set_major_locator(major_locator)
      if major_formatter:
          axis.xaxis.set_major_formatter(major_formatter)
      if minor_locator:
          axis.xaxis.set_minor_locator(minor_locator)
      if minor_formatter:
          axis.xaxis.set_minor_formatter(minor_formatter)
  
      axis.autoscale_view()
      plt.setp(axis.xaxis.get_majorticklabels(), rotation=90)
      plt.setp(axis.xaxis.get_minorticklabels(), rotation=90)
      axis.grid()
docs: Set x axis's format.
  
      This method is designed for time axis.
  
      **中文文档**
  
      设置X轴格式。