exa.core.model_selection_fitter.plotting.plot_result

Contents

exa.core.model_selection_fitter.plotting.plot_result#

plot_result(*, result, quantity, indices=None, coordinate=None, ax=None, plot_style='point', uncertainty_style='errorbar')#

Plot the results of a model selection fit.

Parameters:
  • result (Dataset) – The xarray dataset containing the fit results.

  • quantity (str | list[str]) – The name(s) of the quantity(ies) to plot, e.g. “best_model” or “model_probabilities”.

  • indices (list[tuple[int] | int] | None) – List of indices to plot for the remaining coordinates. Each index can be a single integer or a tuple of integers corresponding to the remaining coordinate dimensions. If None, all indices will be plotted.

  • coordinate (str | list[str] | None) – The name(s) of the coordinate(s) to plot against. If None, the first coordinate of the best_model dimension will be used.

  • ax (Axes | None) – The matplotlib axes to plot on. If None, a new figure and axes will be created.

  • plot_style (Literal['point']) – The style of the plot. Currently only “point” is supported.

  • uncertainty_style (Literal['errorbar', 'fill']) – The style of the uncertainty representation. Can be “errorbar” for error bars or “fill” for filled uncertainty regions. Only applicable if the quantity has a corresponding “_stderr” variable in the dataset.

Returns:

A matplotlib figure containing the plot, or None if plotting failed.

Return type:

FigureBase | None