    Plot a component of the source expression for a data set.

plot_source_component(id, model=None, replot=False, overplot=False, clearwindow=True, **kwargs)
id - int or str, optional
model - str or sherpa.models.model.Model instance
replot - bool, optional
overplot - bool, optional
clearwindow - bool, optional

This function evaluates and plots a component of the model expression for a data set, without any instrument response. Use `plot_model_component` to include any response.

Overplot the pl component of the source expression for the default data set:

>>> plot_source() >>> plot_source_component(pl, overplot=True)

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` .
model
The component to display (the name, if a string).
replot
Set to True to use the values calculated by the last call to `plot_source_component` . 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 function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the `model` parameter. If given two un-named arguments, then they are interpreted as the `id` and `model` parameters, respectively.

The additional keyword arguments match the keywords of the dictionary returned by get_model_plot_prefs.

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

December 2023