get_model_plot
- sherpa.astro.ui.get_model_plot(id: IdType | None = None, recalc: bool = True, copy: bool = True)
Return the data used to create the model plot.
Changed in version 4.19.0: The plot object is now copied by default. To get the previous behaviour set the
copyattribute toFalse.- Parameters:
- id
int,str,orNone,optional The data set that provides the data. If not given then the default identifier is used, as returned by
get_default_id.- recalcbool,
optional If
Falsethen the results from the last call toplot_model(orget_model_plot) are returned, otherwise the data is re-generated.- copybool,
optional Is the plot object copied before being returned? If so then the plot attributes will not be changed by multiple calls to this routine.
- id
- Returns:
instanceAn object representing the data used to create the plot by
plot_model. The return value depends on the data set (e.g. 1D binned or un-binned).
See also
get_model_plot_prefsReturn the preferences for plot_model.
plot_modelPlot the model for a data set.
Examples
>>> mplot = get_model_plot() >>> print(mplot)