ecdf_plot#

cinnabar.plotting.ecdf_plot(datasets: dict[str, ndarray], title: str | None = 'ECDF of Absolute Errors', xlabel: str = 'Edgewise', quantity: str = '$|\\Delta\\Delta$G$_{calc} - \\Delta\\Delta$G$_{exp}|$', units: str = '$\\mathrm{kcal\\,mol^{-1}}$', ylabel: str = 'Cumulative Probability', figsize: float | tuple[float, float] = 4, colors: list[str] | None = None, ecdf_kwargs: dict[str, Any] | None = None, filename: str | None = None, nbootstraps: int = 1000, ci: float = 0.95) Figure[source]#

Plot ECDFs for one or more datasets. Where the dataset is a flat array of absolute errors.

Parameters:
  • datasets (dict[str, np.ndarray]) – A dictionary where keys are dataset labels and values are the data arrays.

  • title (str | None, default “ECDF of Absolute Errors”) – Title for the plot. If None, no title is set.

  • xlabel (str, default “Edgewise”) – Label for the x-axis.

  • quantity (str, default r”$DeltaDelta$G”) – Metric that is being plotted.

  • units (str, default r”$mathrm{kcal,mol^{-1}}$”) – Units of the metric being plotted.

  • ylabel (str, default “Cumulative Probability”) – Label for the y-axis.

  • figsize (float | tuple[float, float], default 4) – Size of the figure.

  • colors (list[str] | None, default None) – List of colors for each dataset. If None, default colors are used.

  • ecdf_kwargs (dict, default None) – Additional keyword arguments to pass to seaborn.ecdfplot.

  • filename (str | None, default None) – If provided, the plot will be saved to this filename.

  • nbootstraps (int, default = 1_000) – Number of bootstraps to perform for estimating confidence intervals.

  • ci (float, default = 0.95) – Confidence level for the confidence intervals (e.g., 0.95 for 95% confidence intervals).

Returns:

The matplotlib Figure object containing the ECDF plot which can be edited further.

Return type:

plt.Figure