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

Synopsis

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

Syntax

Integer_Type chips_get_yrange()

Description

Determines the limits of the plot's y-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

  (ymin,) = chips_get_yrange()
  (,ymax) = chips_get_yrange()

can be used.

The limits may be adjusted with chips_set_yrange.

Example 1

  chips> input=readfile("/data/chips/phas.fits")
  chips> curve x input.x y input.y
  chips> (ymin,ymax) = chips_get_yrange()
  chips> vmessage("ymin = %f, ymax = %f",ymin,ymax)
  ymin = -6.300000, ymax = 132.300003
	

A data file is read in and plotted, then the minimum and maximum values of the y-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_yrange()
  chips> print(rmax)
  36.75
	

Here only the upper (maximum) y-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.