title: How to have only hour, minutes, and seconds for x-axis in matplotlib (and not the date)
body: <p>I have some parameters that I am plotting against 'pandas.core.indexes.datetimes.DatetimeIndex' as x-axis.
  When I plot, I see the day and hour, minute, seconds. How do I get rid of the day? 
  Here is a minimal form of the problem:</p>
  
  <pre><code>time_ci=
  DatetimeIndex(['2019-07-12 13:25:00', '2019-07-12 13:25:10',
             '2019-07-12 13:25:20', '2019-07-12 13:25:30',
             '2019-07-12 13:25:40', '2019-07-12 13:25:50'],
            dtype='datetime64[ns]', freq=None)
  
  
  
   h2o_g_= masked_array(
  data=[[1.7723087072372437],
      [1.7723088264465332],
      [1.7723087072372437],
      [1.7723088264465332],
      [1.7723089456558228],
      [1.7723088264465332]],
  mask=[[False],
      [False],
      [False],
      [False],
      [False],
      [False]],
  fill_value=1e+20,
  dtype=float32)
  </code></pre>
  
  <p>This is the script for the plot:</p>
  
  <pre><code>fig2, ax = plt.subplots(figsize=(12,10))
  plt.plot(time_ci,h2o_g)
  </code></pre>
  
  <p>This is what I get:</p>
  
  <p><a href="https://i.stack.imgur.com/HQ8gA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HQ8gA.png" alt="The plot with datetime, the 12 is the date and i do not want it there."></a></p>
  
  <p>The 12 is the date (that I don't want to be there).</p>
  
  <p>I have already tried these methods:</p>
  
  <pre><code>import matplotlib.dates as md
  ax=plt.gca()
  xfmt = md.DateFormatter('%H:%M:%S')
  ax.xaxis.set_major_formatter(xfmt)
  </code></pre>
  
  <p>and also:</p>
  
  <pre><code>import matplotlib.dates as mdates
  h_fmt = mdates.IndexDateFormatter('%H:%M:%S')
  ax.xaxis.set_major_formatter(h_fmt)
  </code></pre>
  
  <p>but none of them worked.</p>
  
  <p>Also, the seconds are not there either.</p>