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

URL: http://cxc.harvard.edu/sherpa/ahelp/plot.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.6 Sherpa v2

plot

Context: plotting

Synopsis

Plot multiple objects (data, model, residuals, etc.)

Syntax

plot(plot1, [id1] ... [plotn, idn])

Description

The plot command creates plots of multiple Sherpa objects.

  • plot1 ... plotn - the type of plot: arf, bkg, bkgchisqr, bkgdelchi, bkgfit, bkgmodel, bkgratio, bkgresid, bkgsource, chisqr, data, delchi, fit, kernel, model (convolved source model), psf, ratio, resid, or source (unconvolved source model).
  • id1 ... idn - the id of the dataset to use for each plot; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")

Each plot is displayed in a separate plotting area within a ChIPS window. If a plotting window exists, it is cleared before the plots are drawn.

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

There are also individual commands to create specific types of plots ("ahelp -k plot").

Individual Plotting Commands

Command Plot Created
plot_arf ARF
plot_chisqr chi-squared statistic
plot_data dataset
plot_delchi delchi residuals of the fit
plot_fit fit
plot_fit_delchi fit and delta chi
plot_fit_resid fit and residuals
plot_model convolved source model
plot_order convolved source model by order
plot_psf PSF
plot_ratio (data/model) ratio
plot_resid residuals (data - plot model)
plot_source unconvolved source model
plot_bkg background counts
plot_bkg_chisqr background chi squared contributions
plot_bkg_delchi background delta chi
plot_bkg_fit background counts with fitted background model
plot_bkg_fit_delchi background fit and background delta chi
plot_bkg_fit_resid background fit and background residuals
plot_bkg_model convolved background model
plot_bkg_ratio background ratio
plot_bkg_resid background residuals
plot_bkg_source unconvolved source model

Example 1

sherpa> plot("data", "model")

Plot the data and the convolved source model for the default dataset. If the data set is grouped, the model will also be grouped (use plot_model to plot the ungrouped model with the grouped data).

Example 2

sherpa> plot("data", "src", "resid", "src")

Plot the data and residuals for data set "src".

Example 3

sherpa> plot("data", 1, "data", "src", "model", 1, "model", "src")
sherpa> plot("data", "data", "src", "model", "model", "src")

These commands are two equivalent ways of plotting data for id 1, data for "src", model for id 1, and model for "src".

Note that the default id (1, in this case) may be omitted even in the middle of the plot() command.

Bugs

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

See Also

contrib
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
data
get_arf_plot, get_bkg_plot
modeling
normal_sample, t_sample, uniform_sample
plotting
get_energy_flux_hist, get_lrt_plot, get_lrt_results, get_photon_flux_hist, get_pvalue_plot, get_pvalue_results, get_split_plot, plot_arf, plot_bkg, plot_cdf, plot_chisqr, plot_data, plot_delchi, plot_energy_flux, plot_fit, plot_lrt, plot_model, plot_model_component, plot_order, plot_pdf, plot_photon_flux, plot_pvalue, plot_ratio, plot_resid, plot_scatter, plot_source, plot_source_component, plot_trace, set_xlinear, set_xlog, set_ylinear, set_ylog
psfs
plot_kernel
statistics
get_chisqr_plot, get_delchi_plot
visualization
contour_resid

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:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2014. All rights reserved.