|
From: Nils W. <nw...@ia...> - 2008-12-02 17:27:42
|
On Tue, 2 Dec 2008 11:14:48 -0600
"Ryan May" <rm...@gm...> wrote:
> On Tue, Dec 2, 2008 at 11:07 AM, Nils Wagner
> <nw...@ia...>wrote:
>
>> Hi all,
>>
>> If I run the attached example I obtain no polar plots,
>>but a view like
>> plot(t,r_1) - for what reason ?
>>
>
> You need to specify polar=True to the subplot commands.
>Try this:
>
> from pylab import subplot, polar, linspace, show
> from numpy import pi, sin, cos
> t = linspace(0,2*pi,20)
> r_1 = (1+sin(t))
> r_2 = (1+cos(t))
> subplot(211, polar=True)
> polar(t,r_1) #Or can use plot()
> subplot(212, polar=True)
> polar(t,r_2)
> show()
>
> Ryan
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
Hi Ryan,
Thank you very much !
It would be nice to have that information in the docstring
subplot(*args, **kwargs)
Create a subplot command, creating axes with::
subplot(numRows, numCols, plotNum)
where *plotNum* = 1 is the first plot number and
increasing *plotNums*
fill rows first. max(*plotNum*) == *numRows* *
*numCols*
The next inquiry is related to xticks.
I have added
xticks(linspace(0,2*pi,24,endpoint=False))
The difference between consecutive xticks is varying
between 14 and 16 degrees.
For what reason ?
Nils
|