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

Synopsis

Set the y-axis scale

Syntax

Integer_Type chips_set_yscale(scale)

Description

Sets the scale of the plot's y-axis.

Arguments for chips_set_yscale

Name Type Options Comment
scale Numeric 0, 1, "linear", "log", _chips->log, _chips->linear logarithm is base 10

When invoked with no argument, the function will reset the scale to linear.

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

The current scale may be found with chips_get_yscale.

Example 1

  chips> input=readfile("/data/chips/phas.fits")
  chips> curve x input.x y input.y
  chips> chips_set_yscale("log")    
  0
	

A data file is read in and plotted, then the y-axis is changed to log scale. Equivalent commands are:

  chips> chips_set_yscale(0)
  chips> chips_set_yscale(_chips->log)
	

Example 2

  chips> spec=readfile("/data/threads/Chips/data1.pha")
  chips> curve x spec.channels y spec.counts                     
  chips> chips_set_yscale(0)
  Warning: negative and zero values ignored in log scale
  0
  chips> chips_set_yscale(_chips->linear)
  0
	

First, the y-axis is set to logarithmic scale. The second "chips_set_yscale" command changes it back to a linear scale; equivalent commands are:

  chips> chips_set_yscale(1)
  chips> chips_set_yscale("linear")
  chips> chips_set_yscale()
	

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.