xoa.core.plot.Rose.add_bars

Contents

xoa.core.plot.Rose.add_bars#

Rose.add_bars(freq, edges, cmap='YlGnBu', colors=None, label='', legend=True, legend_kwargs=None)[source]#

Add stacked bars

Parameters:
  • freq (array_like(nsector, nbin)) – Frequencies in percent, as returned by xoa.core.stats.rose_hist()

  • edges (array_like(nbin)) – Lower edges of the bins of value

  • cmap (str, matplotlib.colors.Colormap) – Colormap that gives the colors of the bins

  • colors (None, list) – One color per bin, instead of the colormap

  • label (str) – Label of the values, like "Hs [m]", used as the title of the legend

  • legend (bool) – Add a legend of the bins

  • legend_kwargs (None, dict) – Parameters of matplotlib.axes.Axes.legend()

Returns:

list – The matplotlib.container.BarContainer objects