title: matplotlib, how to compress parts of x axis
body: <p>Hey guys this is my first time posting here and hopefully this question isn't too trivial. I tried looking for a solution to this but couldn't find what I wanted.</p>
  
  <p>I have this very simple code here which plots xy line graph</p>
  
  <pre><code>x = [1,2,3,10,11]
  y = [1,2,3,4,5]
  
  plt.plot(x,y)
  plt.xticks(x)
  </code></pre>
  
  <p>The graph then looks like this:
  <a href="https://i.stack.imgur.com/O7sta.png" rel="nofollow noreferrer">Graph</a></p>
  
  <p>What I want to do is compress the x axis such that the spacing between each point is the same. E.g have the space between 3 to 10 be the same as the space between 1 to 2.</p>
  
  <p>Is there a way to do this? Thanks!</p>