    Return the data used by plot_bkg_fit.

get_bkg_fit_plot(id=None, bkg_id=None, recalc=True)
id - int or str, optional
bkg_id - int or str, optional
recalc - bool, optional

Create the data needed to create the "fit plot" for the background of the default data set and display it:

>>> bplot = get_bkg_fit_plot() >>> print(bplot)

Return the plot data for data set 2, and then use it to create a plot:

>>> b2 = get_bkg_fit_plot(2) >>> b2.plot()

The fit plot consists of a combination of a data plot and a model plot, which are captured in the `dataplot` and `modelplot`

attributes of the return value. These can be used to display the plots individually, such as:

>>> b2.dataplot.plot() >>> b2.modelplot.plot()

or, to combine the two:

>>> b2.dataplot.plot() >>> b2.modelplot.overplot()

Return the plot data for the second background component to the "jet" data set:

>>> bplot = get_bkg_fit_plot('jet', bkg_id=2)

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set that provides the data. If not given then the default identifier is used, as returned by `get_default_id` .
bkg_id
Identify the background component to use, if there are multiple ones associated with the data set.
recalc
If False then the results from the last call to

`plot_bkg_fit` (or `get_bkg_fit_plot` ) are returned, otherwise the data is re-generated.

The return value from this function is:

model -- An object representing the data used to create the plot by

`plot_bkg_fit` .

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023