title: Python x axis datetime with numpy array and 2 labels type
body: <p>I was using obspy to plot seismogram, but when you want to customize a little the plot you must use matplotlib.
  But this way I don't succeed to have a x axis using date time, with a first label display the all date, then only seconds (or %M:%S eventually).</p>
  <p>Here the plot using obspy :
  <a href="https://i.stack.imgur.com/HL1oR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HL1oR.png" alt="enter image description here" /></a></p>
  <p>See the date time axe.</p>
  <p>And here my plot using matplotlib :</p>
  <p><a href="https://i.stack.imgur.com/9Yoz6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Yoz6.png" alt="enter image description here" /></a></p>
  <p>How to obtain same time axe than previous graphe ?</p>
  <p>And finally the code for the matplotlib plot :</p>
  <pre><code>trz = st[2].copy()
  tr=trz.trim(starttime=t0, endtime=(t0+float(dur)), nearest_sample=True)
  tr.filter(&quot;bandpass&quot;, freqmin=float(flow), freqmax=float(fhigh), corners=2, zerophase=True)
  t = np.arange(0, tr.stats.npts / tr.stats.sampling_rate, tr.stats.delta)
  
  label=(tr.stats.network + '.' + tr.stats.station + '.' + tr.stats.location + '.' + tr.stats.channel)
  
  fig, ax = plt.subplots(1,1,figsize=(18,10), dpi=200)
  ax.plot(t,tr.data, 'r', label=label)
  ax.set_title('Évènement du '+str(date)+'T'+str(hr)+' station : '+str(sta) + '_' + tr.stats.channel)
  ax.xaxis.grid(True, which='major', color='g', linestyle='dotted', linewidth=0.3)
  ax.yaxis.grid(True, which='major', color='g', linestyle='dotted', linewidth=0.3)
  ax.legend(loc='upper left', ncol=4)
  ax.set_xlim(tr.stats.starttime,tr.stats.endtime)
  
  formatter = mdates.DateFormatter(&quot;%H-%M-%S&quot;)
  ax.xaxis.set_major_formatter(formatter)
  locator = mdates.HourLocator()
  ax.xaxis.set_major_locator(locator)
  </code></pre>