pyiem.plot.windrose module#
A WindrosePlot.
- class pyiem.plot.windrose.WindrosePlot(**kwargs)[source]#
Bases:
objectA plot that has a single windrose on it.
- pyiem.plot.windrose.histogram(speed, direction, bins, nsector)[source]#
Create the histogram on the given data.
- Parameters:
speed (pint.Quantity) – wind speed with units attached.
direction (pint.Quantity) – wind direction from North.
bins (pint.Quantity) – wind thresholds to use for bining. Any value below the first value is considered calm. The last value is extended to infinity to represent the last bin.
- Returns:
the percentage of reports below first bin value. dir_centers (list): the center of the direction bins. table (np.ndarray): The <direction>, <speed> histogram in percent.
- Return type:
calm_percent (float)
- pyiem.plot.windrose.plot(direction, speed, **kwargs)[source]#
Create a WindrosePlot, add bars and other standard things.
- Parameters:
direction (pint.Quantity) – wind direction from North.
speed (pint.Quantity) – wind speeds with units attached.
bins (pint.Quantity) – wind speed bins to produce the histogram for.
nsector (int) – The number of directional centers to divide the wind rose into. The first sector is centered on north.
rmax (float) – Hard codes the max radius value for the polar plot.
cmap (colormap) – Matplotlib colormap to use.
plot_convention (str) – Either from (default) or to.
- Returns:
WindrosePlot