exa.core.plotting.figure_helper.build_model_parameter_figure

exa.core.plotting.figure_helper.build_model_parameter_figure#

build_model_parameter_figure(fits, model_parameter, variables=None, title=None, figure_options=None)#

Build a figure with model parameters plotted against fits data. This function supports up to 3D fits. With 1D fits, plot_bar() is used. Otherwise, plot_multiline() is used.

Parameters:
  • fits (list[DataArray]) – List of fits. Each fit has to have same dimensions and coordinates.

  • model_parameter (str) – The key of the fit parameter to plot in each fit’s fit_parameters dictionary.

  • variables (list[str] | None) – A list of strings corresponding to the variables to plot against. Number of variables must be N - 1, where N is the number of fits dimensions. Has no effect if N = 1. If None is given and N > 1, the model parameters are plotted against the stacked dimension variables in fits.

  • title (str | None) – Figure title. If None is given, one will be automatically created using fits and model_parameter.

  • figure_options (FigureOptions | None) – Figure options to use. If None is given, a new instance of FigureOptions is created.

Returns:

A Figure showing a plot of the data provided.

Return type:

Figure