windrose icon indicating copy to clipboard operation
windrose copied to clipboard

Standardize or set the circle percentages?

Open ale37911 opened this issue 3 years ago • 1 comments

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!

ale37911 avatar Jun 30 '22 20:06 ale37911

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%'])

momofratt avatar Jul 08 '22 14:07 momofratt

@ale37911 I'm closing this as answered. If you disagree please feel free to re-open.

ocefpaf avatar Sep 21 '22 16:09 ocefpaf