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/chips_set_xrange.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 chips_set_xrange Context: chips

Synopsis

Set the upper and/or lower x-axis limits of the plot

Syntax

Integer_Type chips_set_xrange(range)

Description

Sets the limits of the plot's x-axis.

Arguments for chips_set_xrange

Name Type Options Default
range Numeric a pair of numeric values, "auto", or "*" (see below) auto

If a pair of values is used for the "range", it may either be two comma-separated values (minimum and maximum), or a single array whose first two elements will be used as minimum and maximum. The "*" character indicates no change in the current limit, while "auto" allows the underlying plotting package to select the limit value; both of these options must be quoted to work properly.

ChIPS converts double-precision numbers to floating-point values before plotting them, which can cause problems for values that are either too large or too small. The allowed range is approximately 1e-38 to 3e38 (for both positive and negative values).

The function returns a 0 on success and -1 on failure.

The current limits may be found with chips_get_xrange.

Example 1

  chips> input=readfile("/data/chips/phas.fits")
  chips> curve x input.x y input.y
  chips> chips_set_xrange(749,890)    
  0
	

A data file is read in and plotted, then the minimum and maximum values of the x-axis are changed.

Example 2

  chips> spec=readfile("/data/threads/Chips/data1.pha")
  chips> curve x spec.channels y spec.counts                     
  chips> chips_set_xrange(20,"*")
  0
  chips> chips_set_xrange("auto","auto")
  0
	

First, the lower limit of the plot is changed to 20, while the original upper limit is retained. The second "chips_set_xrange" command has the plotting package determine the best limits for the plot.

Bugs

See the bugs page for ChIPS on the CIAO website 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.