seismometer.plot.mpl.compare_series

seismometer.plot.mpl.compare_series(plotdata, cohort_col, ref_str, event_col, ylabel=None, counts=None, show_legend=True)

Creates a line plot of the data using cohorts as hue.

Parameters:
  • plotdata (pd.DataFrame) – The input data.

  • cohort_col (str) – The column name of the cohort, used as hue.

  • ref_str (str) – The column name of the reference time, used as the x-axis.

  • event_col (Optional[str], optional) – The column name of the value, used as y-axis, by default None.

  • ylabel (Optional[str], optional) – The label for the y-axis, by default None; uses the event_col.

  • counts (Optional[pd.DataFrame], optional) – Optional data to plot in a second axis, by default None.

  • show_legend (bool, optional) – A flag when set will show the legend on the plot, by default True.

Return type:

Figure