title: Matplotlib axis with two scales shared origin
body: <p>I need two overlay two datasets with different Y-axis scales in Matplotlib. The data contains both positive and negative values. I want the two axes to share one origin, but Matplotlib does not align the two scales by default. </p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  fig = plt.figure()
  ax1 = fig.add_subplot(111)
  ax2 = ax1.twinx()
  
  ax1.bar(range(6), (2, -2, 1, 0, 0, 0))
  ax2.plot(range(6), (0, 2, 8, -2, 0, 0))
  plt.show()
  </code></pre>
  
  <p>I suppose it is possible to perform some computation with <code>.get_ylim()</code> and <code>.set_ylim()</code> two align the two scales. Is there an easier solution?</p>
  
  <p><img src="https://i.stack.imgur.com/1jPDt.png" alt="Output from the sample above"></p>