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

Synopsis

Set the x-axis scale

Syntax

Integer_Type chips_set_xscale(scale)

Description

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

Arguments for chips_set_xscale

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_xscale.

Example 1

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

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

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

Example 2

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

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

  chips> chips_set_xscale(1)
  chips> chips_set_xscale("linear")
  chips> chips_set_xscale()
	

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.