seismometer.plot.mpl.leadtime_violin

seismometer.plot.mpl.leadtime_violin(data, x_col, y_col, *, xmax=None, axis=None, **kwargs)

Violin plot of leadtime across cohorts.

Parameters:
  • data (pd.DataFrame) – The dataframe containing the leadtime and cohort information.

  • x_col (str) – The leadtimes to be plotted along the x-axis.

  • y_col (str) – The cohort values to split data.

  • xmax (Optional[Number], optional) – An optional maximum leadtime to display, by default None.

  • axis (Optional[plt.Axes], optional) – The matplotlib axis to draw, by default None; creates a new figure.

  • figsize (tuple[int,int], optional) – Size of the figure, by defaults to 9x6.

Return type:

Figure