title: Matplotlib connect scatterplot points with line - Python
body: <p>I have two lists, dates and values. I want to plot them using matplotlib. The following creates a scatter plot of my data.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  plt.scatter(dates,values)
  plt.show()
  </code></pre>
  
  <p><code>plt.plot(dates, values)</code> creates a line graph.</p>
  
  <p>But what I really want is a scatterplot where the points are connected by a line.</p>
  
  <p>Similar to in R:</p>
  
  <pre><code>plot(dates, values)
  lines(dates, value, type="l")
  </code></pre>
  
  <p>, which gives me a scatterplot of points overlaid with a line connecting the points.</p>
  
  <p>How do I do this in python?</p>