title: How can I edit the xticks on a python twinx?
body: <p>I've got two pandas series I would like to plot on the same axis, using a twinx.  Here is a picture of what it looks like:</p>
  
  <pre><code>fig,(ax1,ax2,ax3,ax4,ax5) = plt.subplots(nrows = 5,ncols = 1, figsize = (8,13))
  plt.subplots_adjust(hspace = 0.5)
  
  
  ax1_1 = ax1.twinx()
  
  df[["Var"]].plot(ax = ax1, label = 'Variance')
  df[['w2']].plot(ax = ax1_1, color = 'g', label = '$w$')
  
  
  ax1.locator_params('y',nbins = 5)
  ax1_1.locator_params('y', nbins = 5)
  
  ax1.set_ylabel('AC', labelpad = 10)
  ax1_1.set_ylabel('w',  labelpad = 10)
  ax1.legend(loc = 'upper left')
  ax1_1.legend()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tHgIe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tHgIe.png" alt="enter image description here"></a></p>
  
  <p>I'd like to edit the x axis ticks, but using <code>ax1.set_xticks()</code> and <code>ax1.set_xticklabels()</code> doesn't seem to work.  Furthermore, why are there are no x ticks after I execute the code found above?  Shouldn't the ticks be the index of the Series? </p>