Hi Che,

I think turning off autoscaling is what you need:

import matplotlib.pyplot as plt
ax = plt.subplot(111, autoscaley_on=False, ylim=(0, 100))
plt.plot([1, 2], [-40, 40])
plt.show()

Kind regards,
Matthias

On Monday 08 February 2010 20:49:50 C M wrote:
> I'd like to set the ticks on the y axis such that they do not display
> anything lower than 0, even if part of the graph below 0 is visible.
> I tried to do this with
>
> ylocator = AutoLocator()
> ylocator.view_limits(0, 100)
> self.subplot.yaxis.set_major_locator(ylocator)
>
> but it is not changing anything.  How can I do this?
>
> Thank you,
> Che


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to