windrose
windrose copied to clipboard
Standardize or set the circle percentages?
Is there a way to set the percentage circles plotted/used by windrose.py? In other words, right now when I plot wind data from site A and I set it to normalized, it automatically chooses five circles that seem to fall at random numbers (like 4.6%, 8.9%, 12%, 17% and 20%). Then if I plot site B in the same manner, it choose a different set of five circles. I would like to be able to tell the code please use these bins for the cirlces - 5%, 10%, 15%, 20%, 25%. I know how to specify the bins of magnitude but not the circle bins. Thank you!
Hi ale37911, If I properly understood your question, this should work. You use the set_rticks() method to set the circles and the set_yticklabels() method to set the new labels.
axw = WindroseAxes.from_ax() axw.bar(frame[wind_dir], frame[wind_speed], normed=True, bins=bins,opening=0.8, edgecolor='black', cmap=cm.viridis) axw.set_rticks([5, 10, 15, 20, 25]) axw.set_yticklabels(['5%', '10%', '15%', '20%', '25%'])
@ale37911 I'm closing this as answered. If you disagree please feel free to re-open.