plot_ratio¶
-
sherpa.astro.ui.plot_ratio(id=None, **kwargs)¶ Plot the ratio of data to model for a data set.
This function displays the ratio data / model for a data set.
Parameters: - id (int or str, optional) – The data set. If not given then the default identifier is used, as returned by get_default_id.
- replot (bool, optional) – Set to
Trueto use the values calculated by the last call to plot_ratio. The default isFalse. - overplot (bool, optional) – If
Truethen add the data to an exsiting plot, otherwise create a new plot. The default isFalse.
Raises: sherpa.utils.err.IdentifierErr– If the data set does not exist or a source expression has not been set.See also
get_ratio_plot()- Return the data used by plot_ratio.
get_default_id()- Return the default data set identifier.
plot()- Create one or more plot types.
plot_chisqr()- Plot the chi-squared value for each point in a data set.
plot_delchi()- Plot the ratio of residuals to error for a data set.
plot_resid()- Plot the residuals (data - model) 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 ratio of data to model for the default data set:
>>> plot_ratio()
Overplot the ratios from the ‘core’ data set on those from the ‘jet’ dataset:
>>> plot_ratio('jet') >>> plot_ratio('core', overplot=True)