    Create a contour plot for an image data set.

contour(*args, **kwargs)

Create one or more contour plots, depending on the arguments it is set: a plot type, followed by an optional data set identifier, and this can be repeated. If no data set identifier is given for a plot type, the default identifier - as returned by `get_default_id` - is used. This is for 2D data sets.

>>> contour('data')
>>> contour('data', 1, 'data', 2)
>>> contour('data', 'model')
>>> contour('data', 'model', 'fit', 'resid')
>>> contour('data', 'model', alpha=0.7)

Notes

The supported plot types depend on the data set type, and include the following list. There are also individual functions, with contour_ prepended to the plot type, such as

`contour_data` and the `contour_fit_resid` variant:

Item
Definition
data
The data.
fit
Contours of the data and the source model.
fit_resid
Two plots: the first is the contours of the data and the source model and the second is the residuals.
kernel
The kernel.
model
The source model including any PSF convolution set by `set_psf` .
psf
The PSF.
ratio
Contours of the ratio image, formed by dividing the data by the model.
resid
Contours of the residual image, formed by subtracting the model from the data.
source
The source model (without any PSF convolution set by `set_psf` ).

The keyword arguments are sent to each plot (so care must be taken to ensure they are valid for all plots).

Changes in CIAO

Keyword arguments, such as alpha, can be sent to each plot.

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

December 2023