title: Can't make dates appear on x-axis in pyplot
body: <p>So I've been trying to plot some data. I have got the data to fetch from a database and placed it all correctly into the variable <code>text_</code>. This is the snippet of the code:</p>
  
  <pre><code>import sqlite3
  import matplotlib.pyplot as plt
  import matplotlib.dates as mdates
  from dateutil.parser import parse
  
  fig, ax = plt.subplots()
  
  # Twin the x-axis twice to make independent y-axes.
  axes = [ax, ax.twinx(), ax.twinx()]
  
  # Make some space on the right side for the extra y-axis.
  fig.subplots_adjust(right=0.75)
  
  # Move the last y-axis spine over to the right by 20% of the width of the axes
  axes[-1].spines['right'].set_position(('axes', 1.2))
  
  # To make the border of the right-most axis visible, we need to turn the frame on. This hides the other plots, however, so we need to turn its fill off.
  axes[-1].set_frame_on(True)
  axes[-1].patch.set_visible(False)
  
  # And finally we get to plot things...
  text_ = [('01/08/2017', 6.5, 143, 88, 60.2, 3), ('02/08/2017', 7.0, 146, 90, 60.2, 4), 
           ('03/08/2017', 6.7, 142, 85, 60.2, 5), ('04/08/2017', 6.9, 144, 86, 60.1, 6),
           ('05/08/2017', 6.8, 144, 88, 60.2, 7), ('06/08/2017', 6.7, 147, 89, 60.2, 8)]
  colors = ('Green', 'Red', 'Blue')
  label = ('Blood Sugar Level (mmol/L)', 'Systolic Blood Pressure (mm Hg)', 'Diastolic Blood Pressure (mm Hg)')
  
  y_axisG = [text_[0][1], text_[1][1], text_[2][1], text_[3][1], text_[4][1], text_[5][1]] #Glucose data
  y_axisS = [text_[0][2], text_[1][2], text_[2][2], text_[3][2], text_[4][2], text_[5][2]] # Systolic Blood Pressure data
  y_axisD = [text_[0][3], text_[1][3], text_[2][3], text_[3][3], text_[4][3], text_[5][3]] # Diastolic Blood Pressure data
  
  
  AllyData = [y_axisG, y_axisS, y_axisD] #list of the lists of data
  
  dates = [text_[0][0], text_[1][0], text_[2][0], text_[3][0], text_[4][0], text_[5][0]] # the dates as strings
  x_axis = [(parse(x, dayfirst=True)) for x in dates] #converting the dates to datetime format for the graph
  
  Blimits = [5.5, 130, 70] #lower limits of the axis
  Tlimits = [8, 160, 100] #upper limits of the axis
  
  for ax, color, label, AllyData, Blimits, Tlimits in zip(axes, colors, label, AllyData, Blimits, Tlimits):
      plt.gca().xaxis.set_major_formatter(mdates.DateFormatter('%m/%d/%Y')) #format's the date
      plt.gca().xaxis.set_major_locator(mdates.DayLocator())
      data = AllyData
      ax.plot(data, color=color) #plots all the y-axis'
      ax.set_ylim([Blimits, Tlimits]) #limits
      ax.set_ylabel(label, color=color) #y-axis labels
      ax.tick_params(axis='y', colors=color)
  axes[0].set_xlabel('Date', labelpad=20)
  plt.gca().set_title("Last 6 Month's Readings",weight='bold',fontsize=15)
  
  plt.show()
  </code></pre>
  
  <p>The code currently makes this graph:
  <a href="https://i.stack.imgur.com/tXwX6.jpg" rel="nofollow noreferrer">Graph with no x-values</a></p>
  
  <p>I understand the problem is probably in the <code>ax.plot</code> part but I'm not sure what exactly. I tried putting that line of code as <code>ax.plot(data, x_axis, color=color</code> however, this made the whole graph all messed up and the dates didn't show up on the x-axis like i wanted them to.</p>
  
  <p>Is there something I've missed?
  If this has been answered elsewhere, please can you show me how to implement that into my code by editing my code? </p>
  
  <p>Thanks a ton</p>