[Tutor] Fwd: pylab axis

Danny Yoo dyoo at hashcollision.org
Thu May 29 22:44:48 CEST 2014


[Forwarding to tutor at python.org.  Unfortunately, I don't have time to
look at this personally at the moment.  Please use CC to keep the
conversation on the mailing list, so that others can continue to
follow up.]


---------- Forwarded message ----------
From: Sydney Shall <s.shall at virginmedia.com>
Date: Thu, May 29, 2014 at 11:40 AM
Subject: Re: [Tutor] pylab axis
To: Danny Yoo <dyoo at hashcollision.org>


Dear Danny,
I have tried ylim and it does not present it correctly.
It present the axis on an enlarged with +XXXe-y on the scale, as can
be seen from the pdf of the output. I want to get rid of this extra
bit.
The strange part is that when I first used ylim it did what I wanted,
but now does not.
I am flummoxed.
But thanks anyway.
Sydney


On 29/05/2014 19:09, Danny Yoo wrote:
>>
>> My problem concerns forcing pylab to give me the y axis I want.
>>
>> My code is as follows:
>>
>> pylab.figure(10)
>> pylab.title("Ratio of realised capital to advanced capital.")
>> pylab.xlabel("Time [Cycles of Capital reproduction]")
>> pylab.ylabel("Ratio of realised capital to advanced capital.")
>> pylab.xlim = ((0.0, 1.5))
>> pylab.plot(cycles, ratiocrtoca)
>> pylab.show(10)
>>
>>
>> My problem is that I wish to force the y axis to simply be from 0.0 to 1.5
>> without the detail which is just arithmetic noise, I think.
>
> It appears that you limit the x-axis's bounds by using pylab.xlim().
> Have you tried doing the same with pylab.ylim()?
>
>
> I'm unfamilar with pylab, but have found a tutorial in:
> http://jakevdp.github.io/mpl_tutorial/tutorial_pages/tut1.html.
>
> I think that 'ylim' is what you're looking for, but I'm not positive yet.
>

--
Sydney Shall


More information about the Tutor mailing list