title: plot dataframe with datetime as index and only display hours, minutes, and seconds on x-axis in python
body: <p>I am able to produce the following plot with this code:</p>
  <pre class="lang-py prettyprint-override"><code>df_day['Time'] = pd.to_datetime(df_day['Time'], format = '%H:%M:%S')
  df_day = df_day.set_index('Time')
  
  fig=plt.figure(dpi=900)
  plt.title(&quot;TESTER Summary for Day %i &quot; %y + &quot;\n Average Chamber Pressure %.3f [torr] \n&quot; %p_avg_temp  + str(dates[x]))
  
  ax1 = df_day['DP-2'].plot(label = 'DP-2')
  ax2 = df_day['FM-1'].plot(secondary_y = True, label = &quot;Flow Rate&quot;)
  
  ax1.set_ylabel('Temperatures - Pressure Drop\nInlet Pressure - Scale Weight')
  
  ax2.set_ylabel('Flow Rate - Heat Rej.')
  
  ax1.set_xlabel('Time ')
  
  handles,labels = [],[]
  for ax in fig.axes:
      for h,l in zip(*ax.get_legend_handles_labels()):
          handles.append(h)
          labels.append(l)
  
  plt.legend(handles, labels, loc = 'lower center', bbox_to_anchor = (0.5, -0.5), ncol = 3)
  fig.subplots_adjust(bottom = 0.25)
  
  ax1.grid(True, linestyle = ':')
  ax2.grid(True, linestyle = ':')
  plt.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/0lBPh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0lBPh.jpg" alt="enter image description here" /></a></p>
  <p>But I don't want the date to show up in the xtick labels. I want hours, minutes and seconds. I have also tried:</p>
  <pre class="lang-py prettyprint-override"><code>df_day['Time'] = pd.Series([val.time() for val in df_day['Time']])
  </code></pre>
  <p>instead of</p>
  <pre class="lang-py prettyprint-override"><code>df_day['Time'] = pd.to_datetime(df_day['Time'], format = '%H:%M:%S')
  </code></pre>
  <p>but then I get</p>
  <p><a href="https://i.stack.imgur.com/Ch7iU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ch7iU.jpg" alt="enter image description here" /></a></p>
  <p>and the time intervals are arbitrary and don't include seconds when the seconds are 00.</p>