title: Matplotlib twinx for different scales
body: <p>I am using matplotlib twinx for graphing multiple variables on the same axes. But I have a problem, for which I can't find a solution. For simplicity, I have attached little code and graph plotted by that code below.<br>
  In this picture, I need those bars to be displayed at the bottom of axes as shown in picture 2. But in picture 2, yticks of ax1t remained as the same. I also need them to be displayed at the bottom. How can I do that?</p>
  
  <p>Code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  fig, ax1 = plt.subplots()
  ax1.plot([4, 2, 8, 6, 4, 7, 3, 5])
  ax1t = ax1.twinx()
  ax1t.bar(np.arange(8), [45, 42, 55, 36, 58, 45, 48, 62], alpha=0.4)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Ki7DV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ki7DV.jpg" alt="enter image description here"></a></p>
  
  <p>Picture 2
  <a href="https://i.stack.imgur.com/Ki7DV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AaYBG.jpg" alt="enter image description here"></a></p>