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

Synopsis

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

Syntax

Integer_Type chips_get_xrange()

Description

Determines the limits of the plot's x-axis. On success, two float values will be returned. Two NULLs are returned on error (e.g. if there is no drawing area). Note that the limits returned are those used internally by ChIPS to draw the plot axes, so they may not match the numeric limits of the plotted data.

To return either the minimum or the maximum value, the syntax

  (xmin,) = chips_get_xrange()
  (,xmax) = chips_get_xrange()

can be used.

The limits may be adjusted with chips_set_xrange.

Example 1

  chips> input=readfile("/data/chips/phas.fits")
  chips> curve x input.x y input.y
  chips> (xmin,xmax) = chips_get_xrange()
  chips> vmessage("xmin = %f, xmax = %f",xmin,xmax)
  xmin = 751.849976, xmax = 887.150024
	

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

Example 2

  chips> spec=readfile("/data/threads/Chips/data1.pha")
  chips> curve x spec.channels y spec.counts                     
  chips> (,rmax) = chips_get_xrange()
  chips> print(rmax)
  72.45
	

Here only the upper (maximum) x-axis limit was desired.

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.