Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2013

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.9 Sherpa v1


Context: plotting


Plot the (data/model) ratio


plot_ratio( [id], [replot=False, overplot=False] )


The plot_ratio command plots the ratio of dataset divided by model (data/model).

  • id - the id of the dataset to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • replot - should the cached arrays be used in the plot? False (default)=do the calculation, True=redisplay the existing values
  • overplot - should the new plot be overlaid in the plotting window? False (default)=clear the window, True=overplot on any existing plots

The plot is displayed in a ChIPS plotting window. If there is no plotting window open, one is created. If a plotting window exists, the overplot parameter value determines whether the new plot is overlaid on any existing plots in the window or if the window is cleared before the plot is drawn.

ChIPS commands may be used within Sherpa to modify plot characteristics and create hardcopies; refer to the ChIPS website for information.

Plotting Multiple Objects

To plot multiple Sherpa objects - e.g. data, model, fit, residuals - in a single window, use the plot command.

Example 1

sherpa> plot_ratio()

Plot the ratio for the default dataset.

Example 2

sherpa> plot_ratio("src", overplot=True)

Plot the ratio for the "src" dataset, overlaying on any existing plots.


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

See Also

get_data_prof, get_data_prof_prefs, get_delchi_prof, get_delchi_prof_prefs, get_fit_prof, get_model_prof, get_model_prof_prefs, get_resid_prof, get_resid_prof_prefs, get_source_prof, get_source_prof_prefs, plot_chart_spectrum, prof_data, prof_delchi, prof_fit, prof_fit_delchi, prof_fit_resid, prof_model, prof_resid, prof_source
get_arf_plot, get_bkg_plot
normal_sample, t_sample, uniform_sample
get_energy_flux_hist, get_lrt_plot, get_lrt_results, get_photon_flux_hist, get_pvalue_plot, get_pvalue_results, get_split_plot, plot, plot_arf, plot_bkg, plot_cdf, plot_chisqr, plot_data, plot_delchi, plot_energy_flux, plot_fit, plot_model, plot_model_component, plot_order, plot_pdf, plot_photon_flux, plot_pvalue, plot_resid, plot_scatter, plot_source, plot_source_component, plot_trace, set_xlinear, set_xlog, set_ylinear, set_ylog
get_chisqr_plot, get_delchi_plot

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.