title: Solid and dashed parts of line in one python plot with matplotlib
body: <p>I can draw a plot with two lines using the below code no problem.</p>
  
  <pre><code># libraries
  import matplotlib.pyplot as plt
  import numpy as np
  import pandas as pd
  
  # Data
  
  df=pd.DataFrame({'dates': ['2001','2002','2003','2030'], 'census_people': [306,327,352,478], 'census_houses': [150,200,249,263]})
  
  # multiple line plot
  plt.plot('dates', 'census_people', data=df, marker='o', color='green', linewidth=2)
  plt.plot('dates','census_houses',data=df,marker='o',color='orange',linewidth=2)
  </code></pre>
  
  <p>My question is, I want both lines to be solid, EXCEPT for the part of the line between 2003 and 2030, which I want to be dashed (as it is a projection of what will happen in the future). So something like <a href="https://en.wikipedia.org/wiki/Projections_of_population_growth#/media/File:World_population_v3.svg" rel="nofollow noreferrer">this</a>, where the past data (i.e. the line connecting the first three data points) is a solid line, and the future projected data (i.e. the line connecting the third and fourth data point) is a dashed line.</p>
  
  <p>(I can find lots of examples of plotting a dashed line, just not plotting solid and dashed on the same line).</p>