code: def setup_xrange(self, xrange):
          '''setup plotting ticks on x axis'''
          if self.xaxis:
              return
          xrange *= 24 * 60 * 60
          interval = 1
          intervals = [ 1, 2, 5, 10, 15, 30, 60, 120, 240, 300, 600,
                        900, 1800, 3600, 7200, 5*3600, 10*3600, 24*3600 ]
          for interval in intervals:
              if xrange / interval < 12:
                  break
          self.locator = matplotlib.dates.SecondLocator(interval=interval)
          self.ax1.xaxis.set_major_locator(self.locatorf setup_xrange(self, xrange):
          '''setup plotting ticks on x axis'''
          if self.xaxis:
              return
          xrange *= 24 * 60 * 60
          interval = 1
          intervals = [ 1, 2, 5, 10, 15, 30, 60, 120, 240, 300, 600,
                        900, 1800, 3600, 7200, 5*3600, 10*3600, 24*3600 ]
          for interval in intervals:
              if xrange / interval < 12:
                  break
          self.locator = matplotlib.dates.SecondLocator(interval=interval)
          self.ax1.xaxis.set_major_locator(self.locator)
docs: setup plotting ticks on x axis