Matplotlib Polar Plot Angles/Axes

afrogazer justin.kuto at
Fri Sep 26 19:41:53 CEST 2008

I am creating a wind rose using a polar bar plot bu the points do not
seem to align to the correct angles. Here is the sample code I am
using. I can't seem to see anything in the API on how to set the

Any ideas anybody?


from pylab import *

angles = arange(0,360,45)
data = [18, 11, 11, 17, 39, 43, 25, 9]

fig = figure(figsize=(8,8))
title('Wind Speed/Direction Frequency.', fontsize=13)
ax = fig.add_subplot(111)
fig.add_axes(([0.15,0.15,0.725,0.725]), polar=True)
labels = arange(0,360,22.5)
lines = arange(0,360,22.5)
bar(angles, data, alpha=0.75, align='center', linewidth=0)


More information about the Python-list mailing list