title: How to use ax.get_ylim() in matplotlib
body: <p>I do the following imports: </p>
  
  <pre><code>import matplotlib.pyplot as plt
  import matplotlib.axes as ax
  import matplotlib
  import pylab
  </code></pre>
  
  <p>It properly executes</p>
  
  <pre><code>plt.plot(y1, 'b')
  plt.plot(y2, 'r')
  plt.grid()
  plt.axhline(1, color='black', lw=2)
  plt.show()
  </code></pre>
  
  <p>and shows the graph.</p>
  
  <p>But if I insert</p>
  
  <pre><code>print("ylim=", ax.get_ylim())
  </code></pre>
  
  <p>I get the error message: </p>
  
  <blockquote>
    <p>AttributeError: 'module' object has no attribute 'get_ylim'</p>
  </blockquote>
  
  <p>I have tried replacing ax. with plt., matplotlib, etc., and I get the same error.</p>
  
  <p>What is the proper way to call <code>get_ylim</code>?</p>