code: def _make_timestamps(start_time, minimum, maximum, steps):
      
      t0 = start_time + timedelta(seconds=minimum)
      t1 = start_time + timedelta(seconds=maximum)
  
      t0_midnight = t0.replace(hour=0, minute=0, second=0, microsecond=0)
  
      d0 = t0 - t0_midnight
      d1 = t1 - t0_midnight
  
      first_stamp = ceil(d0.total_seconds() / steps) * steps
      last_stamp = ceil(d1.total_seconds() / steps) * steps
  
      stamp_label = []
      stamp_time = []
      for stamp in range(first_stamp, last_stamp, steps):
          stamp_as_datetime = t0_midnight + timedelta(seconds=stamp)
          stamp_label.append(stamp_as_datetime.strftime('%H:%M'))
          stamp_time.append(stamp - d0.total_seconds())
  
      return stamp_label, stamp_time
docs: Create timestamps on x-axis, every so often.
  
      Parameters
      ----------
      start_time : instance of datetime
          actual start time of the dataset
      minimum : int
          start time of the recording from start_time, in s
      maximum : int
          end time of the recording from start_time, in s
      steps : int
          how often you want a label, in s
  
      Returns
      -------
      dict
          where the key is the label and the value is the time point where the
          label should be placed.
  
      Notes
      -----
      This function takes care that labels are placed at the meaningful time, not
      at random values.