From: John Hunter <jdh2358@gm...> - 2005-04-22 14:24:42
> I am trying to scale the y axis like this:
> a =3D axes(gca())
This is probably harmless but redundant. gca creates a new axes if
none exists, so you can do
any of the foloowing
a =3D gca()
a =3D subplot(111)
a =3D axes([0.1, 0.1, 0.8, 0.8])
but I wouldn't do axes(gca())
> a.set_ylim((-1.25, 1.25))
> This works fine when yticks is non-empty. However, if I do
> either before or after the set_ylim call, the y axis is not scaled.
> Any suggestions are appreciated.=20
Make sure that you are updating the figure after you change the
properties. The figure is automatically redrawn after pylab commands
if interactive is True, but afterr calling object setters, you need to
explicitly call draw (if working interactively)
Please post a complete example which exposes the problem, as well as
matplotlib version and backend information. You can get the latter by
running your script with --verbose-helpful.
Get latest updates about Open Source Projects, Conferences and News.