    Plot the residuals (data - model) for a data set.

plot_resid(id=None, replot=False, overplot=False, clearwindow=True, **kwargs)
id - int or str, optional
replot - bool, optional
overplot - bool, optional
clearwindow - bool, optional

This function displays the residuals (data - model) for a data set.

Plot the residuals for the default data set:

>>> plot_resid()

Overplot the residuals from the 'core' data set on those from the 'jet' dataset:

>>> plot_resid('jet') >>> plot_resid('core', overplot=True)

Add the residuals to the plot of the data, for the default data set:

>>> plot_data() >>> plot_resid(overplot=True)

Additional arguments can be given that are passed to the plot backend: the supported arguments match the keywords of the dictionary returned by `get_data_plot_prefs` . The following sets the cap length for the ends of the error bars:

>>> plot_resid(capsize=5)

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set. If not given then the default identifier is used, as returned by `get_default_id` .
replot
Set to True to use the values calculated by the last call to `plot_resid` . The default is False .
overplot
If True then add the data to an existing plot, otherwise create a new plot. The default is False .
clearwindow
Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

Notes

The additional arguments supported by `plot_resid` are the same as the keywords of the dictionary returned by `get_data_plot_prefs` .

The ylog setting is ignored, and the Y axis is drawn using a linear scale.

Changes in CIAO

The Y axis is now always drawn using a linear scale.

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

December 2023