brightwind.analyse.plot.plot_scatter

brightwind.analyse.plot.plot_scatter(x_series, y_series, x_axis_title=None, y_axis_title=None, x_limits=None, y_limits=None)

Plots a scatter plot of two variable’s timeseries.

Parameters
  • x_series (pd.Series) – The x-axis values or reference variable.

  • y_series (pd.Series) – The y-axis values or target variable.

  • x_axis_title (str, None) – Title for the x-axis. If None, title will be taken from x_series name.

  • y_axis_title (str, None) – Title for the y-axis. If None, title will be taken from y_series name.

  • x_limits (tuple, None) – x-axis min and max limits.

  • y_limits (tuple, None) – y-axis min and max limits.

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 variables against each other
bw.plot_scatter(data.Spd80mN, data.Spd80mS)

# To overwrite the default axis titles.
bw.plot_scatter(data.Dir78mS, data.Dir58mS, x_axis_title='Dir78mS', y_axis_title='Dir58mS')

# To set the x and y axis limits by using a tuple.
bw.plot_scatter(data.Dir78mS, data.Dir58mS, x_axis_title='Dir78mS', y_axis_title='Dir58mS',
                x_limits=(50,300), y_limits=(250,300))