title: Getting vertical gridlines to appear in line plot in matplotlib
body: <p>I want to get both horizontal and vertical grid lines on my plot but only the horizontal grid lines are appearing by default. I am using a <code>pandas.DataFrame</code> from an sql query in python to generate a line plot with dates on the x-axis. I'm not sure why they do not appear on the dates and I have tried to search for an answer to this but couldn't find one.</p>
  
  <p>All I have used to plot the graph is the simple code below. </p>
  
  <pre><code>data.plot()
  grid('on')
  </code></pre>
  
  <p>data is the DataFrame which contains the dates and the data from the sql query. </p>
  
  <p>I have also tried adding the code below but I still get the same output with no vertical grid lines.</p>
  
  <pre><code>ax = plt.axes()        
  ax.yaxis.grid() # horizontal lines
  ax.xaxis.grid() # vertical lines
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p><img src="https://i.stack.imgur.com/nsdzO.png" alt="enter image description here"></p>