huracanpy.plot.pressure_wind_relation#
- huracanpy.plot.pressure_wind_relation(pressure=None, wind=None, bins_pressure=None, bins_wind=None, pressure_units='hPa', wind_units='m s-1', grid=None, color=None, label=None, mslp_convention='Klotzbach', wind_convention='10min', jointgrid_kws=None, scatterplot_kws=None, lineplot_kws=None, histplot_kws=None, pressure_wind_model_kwargs=None, category_color='darkgrey', category_linestyle='--')[source]#
Plot a pressure wind relation
Creates a figure with 3 axes. A central pressure wind scatter plot with a line of best fit (by default a quadratic least squares fit), and a histogram at the edges of the central axis showing pressure and wind separately. The central plot also includes horizontal and vertical lines to show the boundaries of intensity categories for both pressure and wind.
To overlay multiple datasets, call this function multiple times and pass the returned grid (and optionally bins) from the first call.
- Parameters:
pressure (array_like) – Cyclone pressure minima
wind (array_like) – Cyclone wind maxima
bins_pressure (array_like, optional) – The bin edges to use for the marginal histogram of pressure. Uses 10 equally spaced bins across the range of data if not specified
bins_wind (array_like, optional) – The bin edges to use for the marginal histogram of wind. Uses 10 equally spaced bins across the range of data if not specified
pressure_units (str, default="hPa") – Units of the input pressure data, if not already specified as part of the input
wind_units (str, default="m s-1") – Units of the input wind data, if not already specified as part of the input
grid (seaborn.JointGrid, optional) – The grid on which to put the plots. Use if you want to overlay multiple pressure-wind plots on the same grid by passing the grid returned from the first call of this function
color (str, optional) – The colour to use for each plot (scatter, best fit, and histograms). Will use the next colour in the matplotlib colour cycle if not specified
label (str, optional) – Labels the line of best fit. For using with
matplotlib.pyplot.legend()mslp_convention (str, default="Klotzbach") – The convention used to add a set of lines marking the boundaries between pressure categories. The other option is “Simpson”
wind_convention (str, default="10min") – The convention used to add a set of lines marking the boundaries between wind categories. It is based on the Saffir-Simpson scale and the time period used for sustained winds. The other option is “1min”
jointgrid_kws (dict, optional) – Passed to
seaborn.JointGridwhen creating a new figure. By default, this function changes marginal_ticks to True, but this can be overwrittenscatterplot_kws (dict, optional) – Passed to
seaborn.scatterplot()to plot all pressure/wind points. By default, this function changes alpha to 0.1 and marker to ., but this can be overwrittenlineplot_kws (dict, optional) – Passed to
seaborn.lineplot()to plot the best fit linehistplot_kws (dict, optional) – Passed to
seaborn.histplot()to plot the marginal 1d histograms. By default, this function changes element to “step” and fill to False, but this can be overwrittenpressure_wind_model_kwargs (dict, optional) – Passed to
huracanpy.tc.pressure_wind_relation()to calculate the best fit line for the datacategory_color (str, default="darkgrey") – The colour of the horizontal and vertical lines showing the boundaries of the intensity categories
category_linestyle (str, default="--") – The linestyle of the horizontal and vertical lines showing the boundaries of the intensity categories
- Return type:
tuple[seaborn.JointGrid, array_like, array_like]