Requesting a minor addition to include a %-sign on the y-axis values when the normed=True flag is used.
I believe this should be a simple fix and have provided a simple example below which relies on matplotlib.ticker.PercentFormatter.
Likely would just need to pass the normed=True kwarg to the WindAxesFactorycreate method. I would be willing to open a PR for this.
Minimal Working Example
importnumpyasnpfrommatplotlib.tickerimportPercentFormatterfromwindroseimportplot_windrosedf=pd.DataFrame(data={
'speed':np.random.random(1000),
'direction':np.random.randint(low=0,high=361,size=1000),
})
ax=plot_windrose(df,kind='bar',normed=True)
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ## Adding this line formats the y-axis as x% ## !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #ax.yaxis.set_major_formatter(PercentFormatter())
Requesting a minor addition to include a %-sign on the y-axis values when the
normed=Trueflag is used.I believe this should be a simple fix and have provided a simple example below which relies on
matplotlib.ticker.PercentFormatter.Likely would just need to pass the
normed=Truekwarg to theWindAxesFactorycreatemethod. I would be willing to open a PR for this.Minimal Working Example