title: Automatically setting y-axis limits for bar graph using matplotlib
body: <p>Here's an example of graphing large values.  </p>
  
  <pre><code>import matplotlib.pyplot as plt
  x = [1,2,3,4,5]
  y = [1000, 1002, 1001, 1003, 1005]
  plt.bar(x,y) 
  plt.show()
  </code></pre>
  
  <p>The y-axis starts at 0, so the bars all look equal. I know you can use plt.ylim to manually set the limits, but is there a way for matplotlib to automatically (and smartly) set the  limits to reasonable values (like 998-1008), and also perhaps show an axis break?</p>