About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/set_erron.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 set_erron Context: sherpa

Synopsis

Switch on the drawing of error bars in Sherpa plots

Syntax

set_erron
set_xerron
set_yerron

Description

These commands allow a user to turn on the drawing of error bars in all Sherpa plots. A plotting command LPLOT needs to be issued in order for these commands to take effect.

Errors bars can be turned on or off in plots (from LPLOT) by setting the x_errorbars and y_errorbars fields in the corresponding Sherpa configuration variable (also called "state object") sherpa.plot, sherpa.dataplot, sherpa.fitplot, or sherpa.resplot.

The functions set_erron, set_xerron, and set_yerron allow you to change these fields in all the configuration variables (sherpa.plot, sherpa.dataplot, sherpa.fitplot, sherpa.resplot) in one go as shown in the following table:

Function Name Description
set_erron() Set x_errorbars = 1 and y_errorbars = 1
set_xerron() Set x_errorbars = 1
set_yerron() Set y_errorbars = 1

Example 1

sherpa> set_erron

This turns on the drawing of errorbars (both in x and y directions) in all Sherpa plots.

Example 2

sherpa> set_xerron

This turns on the drawing of errorbars in only the x direction in all Sherpa plots.

Example 3

sherpa> set_yerron
sherpa> print(sherpa.fitplot.y_errorbars)
1
sherpa> lplot 2 fit delchi

The first command (set_yerron) turns on the drawing of errorbars in only the y direction in all Sherpa plots. The second command prints out the value of the y_errorbars field of the sherpa.fitplot variable; it is set to 1 because of the set_yerron command. The third command displays two plots with the errorbars in only the y direction.

Example 4

sherpa> set_yerron
sherpa> sherpa.fitplot.y_errorbars = 0
sherpa> lplot fit

The first command (set_yerron) turns on the drawing of errorbars in only the y direction in all Sherpa plots. The second command changes the sherpa.fitplot variable so that its y_errorbars field is set to 0 which means that "LPLOT FIT" will not include y error bars. The third command displays the fit with no errorbars in y direction.

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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-2004. All rights reserved.