[email protected] wrote:
>
>I've been trying to figure out how to do this for a while with
>matplotlib. I need to make polar plots which go around clockwise and
>have 0deg on top (north) instead of on the side (east). How can this
>be done?
Is it really that hard?
def compass( theta, r, **kwargs ):
matplotlib.pyplot.polar( math.pi/2 - theta, r, **kwargs )
or, to handle lists of points:
def compass( theta, r, **kwargs ):
d90 = math.pi/2
if type(theta) == list:
rotate = [d90 - k for k in theta]
return matplotlib.pyplot.polar( rotate, r, **kwargs )
else:
return matplotlib.pyplot.polar( d90 - theta, r, **kwargs )
--
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list