On Tue, 2 Dec 2008 11:14:48 -0600
 "Ryan May" <[EMAIL PROTECTED]> wrote:
On Tue, Dec 2, 2008 at 11:07 AM, Nils Wagner
<[EMAIL PROTECTED]>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

<<attachment: polar.png>>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to