I can draw a plot with two lines using the below code no problem.
# 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)
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 this, 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.
(I can find lots of examples of plotting a dashed line, just not plotting solid and dashed on the same line).