get_data_plot
- sherpa.ui.get_data_plot(id: IdType | None = None, recalc: bool = True, copy: bool = True)
Return the data used by plot_data.
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_data(orget_data_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:
- data
asherpa.plot.DataPlotinstance An object representing the data used to create the plot by
plot_data. The relationship between the returned values and the values in the data set depend on the data type. For example PHA data are plotted in units controlled bysherpa.astro.ui.set_analysis, but are stored as channels and counts, and may have been grouped and the background estimate removed.
- data
See also
get_data_plot_prefsReturn the preferences for plot_data.
get_default_idReturn the default data set identifier.
plot_dataPlot the data values.