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 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


[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.  How can I do this?

Thank you,
Che

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users