    Plot the source expression for a data set.

plot_source(id=None, lo=None, hi=None, replot=False, overplot=False, clearwindow=True, **kwargs)
id - int or str, optional
lo - number, optional
hi - number, optional
replot - bool, optional
overplot - bool, optional
clearwindow - bool, optional

This function plots the source model for a data set. This does not include any instrument response (e.g. a convolution created by `set_psf` or ARF and RMF automatically created for a PHA data set).

Plot the unconvolved source model for the default data set:

>>> plot_source()

Overplot the source model for data set 2 on data set 1:

>>> plot_source(1) >>> plot_source(2, overplot=True)

Restrict the plot to values between 0.5 and 7 for the independent axis:

>>> plot_source(lo=0.5, hi=7)

For a PHA data set, the units on both the X and Y axes of the plot are controlled by the `set_analysis` command. In this case the Y axis will be in units of photons/s/cm^2 and the X axis in keV:

>>> set_analysis('energy', factor=1) >>> plot_source()

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` .
lo
The low value to plot (only used for PHA data sets).
hi
The high value to plot (only use for PHA data sets).
replot
Set to True to use the values calculated by the last call to `plot_source` . 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)?

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

December 2023