title: X labels matplotlib
body: <p>I want to change x axis to years. The years are saves in the variable years. </p>
  
  <p>I want to make plot of my data that looks like this:
  <a href="http://i.stack.imgur.com/Z8PW0.png" rel="nofollow">It should look like this image</a></p>
  
  <p>However, I am not able to create x axes with a years. My plot looks like the following image: 
  <a href="http://i.stack.imgur.com/jJBRF.png" rel="nofollow">This is an example of produced image by my code</a></p>
  
  <p>My code looks as follows:</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  
  data = pd.read_csv("data1.csv")
  demand = data["demand"]
  years = data["year"]
  plt.plot( demand, color='black')
  plt.xlabel("Year")
  plt.ylabel("Demand (GW)")
  plt.show()
  </code></pre>
  
  <p>I am thankful for any advice.</p>