Re: [Matplotlib-users] help with view_limits

2010-02-10 Thread Matthias Michler
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 a

[Matplotlib-users] help with view_limits

2010-02-08 Thread C M
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.