windrose icon indicating copy to clipboard operation
windrose copied to clipboard

i want fix the legend range in rose plot

Open satya0210 opened this issue 1 year ago • 1 comments

plot1 plot2

the above plots different legend

i want fix the range of the lengend

my code is here

from windrose import WindroseAxes from matplotlib import pyplot as plt import matplotlib.cm as cm from numpy.random import random from numpy import arange import pandas as pd MON=pd.read_csv(r'data.csv') ws = MON["Ws"].values wd = MON["Wd"].values ax = WindroseAxes.from_ax() ax.set_ylim(0,50) ax.bar(wd, ws, normed=True, opening=0.8, edgecolor='white') ax.set_title('plot2') ax.set_legend()

satya0210 avatar Jun 29 '23 18:06 satya0210

I am not sure I understand what your issue or request actually is: but you can use bins to make the plot/legend have "nicer" groups

 ax.bar(wd, ws, normed=True, opening=0.8, edgecolor='white', bins=(0, 1, 2, 3, 4, 5)

jkittner avatar Apr 21 '24 22:04 jkittner