brightwind.analyse.plot.plot_scatter_wspd¶
-
brightwind.analyse.plot.
plot_scatter_wspd
(x_wspd_series, y_wspd_series, x_axis_title=None, y_axis_title=None, x_limits=(0, 30), y_limits=(0, 30))¶ Plots a scatter plot of two wind speed timeseries and adds a reference line from 0,0 to 40,40. This should only be used for wind speeds in m/s and not when one of the wind speed series is normalised. Please use the basic ‘plot_scatter()’ function when using normalised wind speeds.
- Parameters
x_wspd_series (pd.Series) – The x-axis values or reference wind speeds.
y_wspd_series (pd.Series) – The y-axis values or target wind speeds.
x_axis_title (str, None) – Title for the x-axis. If None, title will be taken from x_wspd_series name.
y_axis_title (str, None) – Title for the y-axis. If None, title will be taken from y_wspd_series name.
x_limits (tuple, None) – x-axis min and max limits. Can be set to None to let the code derive the min and max from the x_wspd_series.
y_limits (tuple, None) – y-axis min and max limits. Can be set to None to let the code derive the min and max from the y_wspd_series.
- Returns
scatter plot
- Return type
matplotlib.figure.Figure
Example usage
import brightwind as bw data = bw.load_csv(bw.datasets.demo_data) # To plot two wind speeds against each other bw.plot_scatter_wspd(data.Spd80mN, data.Spd80mS) # To overwrite the default axis titles. bw.plot_scatter_wspd(data.Spd80mN, data.Spd80mS, x_axis_title='Speed at 80m North', y_axis_title='Speed at 80m South') # To set the x and y axis limits by using a tuple. bw.plot_scatter_wspd(data.Spd80mN, data.Spd80mS, x_axis_title='Speed at 80m North', y_axis_title='Speed at 80m South', x_limits=(0,25), y_limits=(0,25))