title: How to add two different lines in a plot, each line represents a year in a Dataframe
body: <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  import sympy as sp
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  import sympy as sp
  import numpy as np
  </code></pre>
  <p>This is my codes, I now dont get how I can get 1960 df in there too.</p>
  <pre><code>def demand_curve(c,Q,y,pb):
      #Programmer ligning 14 her. Bruk c.log() for å regne ut logaritmen.
      demand = ((c.log(Q)-(-4.507+0.841*y+0.2775*pb)) / (-0.397))
      return demand
  def supply_curve_long_run(c,Q,N,X,pf,t):
      #Programmer ligning 15 her. Bruk c.log() for å regne ut logaritmen.
      supply = (((1-0.631)*c.log(N*Q+X)-(2.030-0.14*pf+0.0184*t)) / 0.221)
      return supply
  c.log
  ​
  def supply_curve_short_run(c,Q,N,X,pf,t,Q_fitted):
      #Programmer ligning 16 her. Bruk c.log() for å regne ut logaritmen.
      #TIPS: qprod i ligningen er (N*Q_fitted+X) her. 
      supply = (((c.log(N*Q+X)-(2.030-0.146*pf+0.0184*t+0.631*c.log(N*Q_fitted+X)))) / 0.221)
      return supply
  def equate_q(y,pb,N,X,pf,t):
      Q=sp.symbols('Q')
      navn = sp.Eq(demand_curve(sp,Q,y,pb),supply_curve_long_run(sp,Q,N,X,pf,t))
      sol = sp.nsolve(navn, 40)
      return float(sol)
  df=pd.read_csv(&quot;https://uit-sok-1006-v22.github.io/innleveringer/chickendata.csv&quot;,delimiter=&quot;;&quot;)
      plt.plot(Q,np.exp(supply_curve_long_run(np,Q,N,X,pf,t))* cpi, label='Tilbud på lang sikt', linestyle='dotted')
  
  def plot_year(df,year):
  ​
      #obtaining the relevant variables for year:
      d=df[df['YEAR']==year].to_dict(orient='records')[0]
      
      cpi=d['CPI']
      y=np.log(d['Y'])
      pb=np.log(d['PBEEF']/cpi)
      N=d['POP']
      X=d['QPRODA']/1439-d['Q']*d['POP']
      pf=np.log(d['PF']/cpi)
      t=d['TIME']
      
      #obtaining equilibrium quantity:
      Q_fitted=equate_q(y,pb,N,X,pf,t) 
      Q=np.linspace(0.1,80,100)
  ​
      #plotting the functions:
      plt.title('Figur 1; Tilbud- og etterspørselskurve')
      plt.ylabel('Pris')
      plt.xlabel('Mengde')
      plt.plot(Q,np.exp(demand_curve(np,Q,y,pb)) * cpi, label='Etterspørsel')
      plt.plot(Q,np.exp(supply_curve_long_run(np,Q,N,X,pf,t))* cpi, label='Tilbud på lang sikt', linestyle='dotted')
      plt.plot(Q,np.exp(supply_curve_short_run(np,Q,N,X,pf,t,Q_fitted))*cpi, label='Tilbud på kort sikt', linestyle='dotted')
      plt.legend(bbox_to_anchor=(1.1,0.6))
      plt.ylim(0,400)
      
      plt.show()
  plot_year(df,1995)
  </code></pre>
  <p>**Where I should plot the two years together in same plot **</p>
  <blockquote>
  <p>#Plot figures for year 1960 and 1995
  ​
  ​</p>
  <blockquote>
  <blockquote>
  <p>#Scenarioanalytics.
  #Making three more plots in the same figure where we add 0.5 to 'kvantum, inntekt og storfekjøtt'.
  ​
  ​</p>
  </blockquote>
  </blockquote>
  </blockquote>