title: Pandas dataframe plotting - issue when switching from two subplots to single plot w/ secondary axis
body: <p>I have two sets of data I want to plot together on a single figure. I have a set of flow data at 15 minute intervals I want to plot as a line plot, and a set of precipitation data at hourly intervals, which I am resampling to a daily time step and plotting as a bar plot. Here is what the format of the data looks like:</p>
  
  <pre><code>2016-06-01 00:00:00             56.8
  2016-06-01 00:15:00             52.1
  2016-06-01 00:30:00             44.0
  2016-06-01 00:45:00             43.6
  2016-06-01 01:00:00             34.3
  </code></pre>
  
  <p>At first I set this up as two subplots, with precipitation and flow rate on different axis. This works totally fine. Here's my code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  from datetime import datetime
  
  filename = 'manhole_B.csv'
  plotname = 'SSMH-2A B'
  plt.style.use('bmh')
  
  # Read csv with precipitation data, change index to datetime object
  pdf = pd.read_csv('precip.csv', delimiter=',', header=None, index_col=0)
  pdf.columns = ['Precipitation[in]']
  pdf.index.name = ''
  pdf.index = pd.to_datetime(pdf.index)
  pdf = pdf.resample('D').sum()
  print(pdf.head())
  
  # Read csv with flow data, change index to datetime object
  qdf = pd.read_csv(filename, delimiter=',', header=None, index_col=0)
  qdf.columns = ['Flow rate [gpm]']
  qdf.index.name = ''
  qdf.index = pd.to_datetime(qdf.index)
  
  
  # Plot
  f, ax = plt.subplots(2)
  qdf.plot(ax=ax[1], rot=30)
  pdf.plot(ax=ax[0], kind='bar', color='r', rot=30, width=1)
  
  ax[0].get_xaxis().set_ticks([])
  ax[1].set_ylabel('Flow Rate [gpm]')
  ax[0].set_ylabel('Precipitation [in]')
  ax[0].set_title(plotname)
  f.set_facecolor('white')
  f.tight_layout()
  plt.show()
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/qun10.png" rel="nofollow">2 Axis Plot</a></p>
  
  <p>However, I decided I want to show everything on a single axis, so I modified my code to put precipitation on a secondary axis. Now my flow data data has disppeared from the plot, and even when I set the axis ticks to an empty set, I get these 00:15 00:30 and 00:45 tick marks along the x-axis.</p>
  
  <p><a href="http://i.stack.imgur.com/dl3dP.png" rel="nofollow">Secondary-y axis plots</a></p>
  
  <p>Any ideas why this might be occuring?</p>
  
  <p>Here is my code for the single axis plot:</p>
  
  <pre><code>f, ax = plt.subplots()
  qdf.plot(ax=ax, rot=30)
  pdf.plot(ax=ax, kind='bar', color='r', rot=30, secondary_y=True)
  ax.get_xaxis().set_ticks([])
  </code></pre>