plot_model¶
-
sherpa.astro.ui.
plot_model
(id=None, **kwargs)¶ Plot the model for a data set.
This function plots the model for a data set, which includes any instrument response (e.g. a convolution created by set_psf).
Parameters: - id (int or str, optional) – The data set that provides the data. If not given then the default identifier is used, as returned by get_default_id.
- replot (bool, optional) – Set to
True
to use the values calculated by the last call to plot_model. The default isFalse
. - overplot (bool, optional) – If
True
then add the data to an exsiting plot, otherwise create a new plot. The default isFalse
.
See also
get_model_plot()
- Return the data used by plot_model.
get_model_plot_prefs()
- Return the preferences for plot_model.
get_default_id()
- Return the default data set identifier.
plot()
- Create one or more plot types.
plot_model_component()
- Plot a component of the model for a data set.
plot_source()
- Plot the source expression for a data set.
set_xlinear()
- New plots will display a linear X axis.
set_xlog()
- New plots will display a logarithmically-scaled X axis.
set_ylinear()
- New plots will display a linear Y axis.
set_ylog()
- New plots will display a logarithmically-scaled Y axis.
Examples
Plot the convolved source model for the default data set:
>>> plot_model()
Overplot the model for data set 2 on data set 1:
>>> plot_model(1) >>> plot_model(2, overplot=True)
Create the equivalent of
plot_fit('jet')
:>>> plot_data('jet') >>> plot_model('jet', overplot=True)