Note

Please report issues with this page on the GitHub page.

supy.util.plot_comp

supy.util.plot_comp(df_var, scatter_kws={'alpha': 0.1, 'color': 'k', 's': 0.3}, kde_kws={'levels': 4, 'shade': True, 'shade_lowest': False}, show_pdf=False, fig=None, ax=None)[source]

Produce a scatter plot with linear regression line to compare simulation results and observations.

Parameters:
  • df_var (pd.DataFrame) – DataFrame containing variables to plot with datetime as index. Two columns, ‘Obs’ and ‘Sim’ for observations and simulation results, respectively, must exist.
  • scatter_kws (dict) – keyword arguments passed to sns.regplot. By default, {"alpha": 0.1, "s": 0.3, "color": "k"}.
  • show_pdf (boolean) – if a PDF overlay should be added. By default, False.
  • kde_kws (dict) – kde_kws passed to sns.kdeplot when show_pdf=True
Returns:

figure showing 1:1 line plot

Return type:

MPL.figure