On Wed, Jun 6, 2012 at 3:32 PM, kamel maths <kamel.maths@gmail.com> wrote:
Hi,

for this script:
------------------------------------
from pylab import *

fig = figure()
ax = fig.add_subplot(111)
ax.axis('equal')

x = linspace(-2, 3, 50)
ax.plot(x, sin(x))

show()
---------------------------------
If I try to get ymax with ax.get_ylim(), i obtain 1.0 whereas I observe it is 2.0.
How can I obtain 2.0 for ymax ?

Thanks.

Kamel

Hi Kamel,

I'm not seeing the same result: I actually get back (-1.94, 1.94) from `get_ylim`. When do you call `get_ylim`? Do you call it *after* calling `plot`?

-Tony