title: Show specific range in graphic
body: <p>I'm just starting with matplotlib. For example, having the following code:</p>
  
  <pre><code>import pylab
  
  x = [1, 2, 3, 4, 5, 6, 7]
  y = [2, 3, 4, 5, 6, 7, 8]
  
  pylab.plot(x, y)
  pylab.axhline(0, color="black")
  pylab.axvline(0, color="black")
  
  pylab.show()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ABXaj.png" alt="enter image description here"></p>
  
  <p>Shows from <code>0</code> to <code>8</code> (Y) and <code>0</code> to <code>7</code> (X). Is there anyway to specify the range of the values showed in the axes? For example, from <code>-5</code> to <code>3</code> and from <code>-5</code> to <code>3</code>. It doesn't matter if the function line is out of that range.</p>