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 2008

URL: http://cxc.harvard.edu/chips4.1/current_axis.sl.html
AHELP for ChIPS 4.1

current_axis

Context: sl.chips

Synopsis

Set the specified axis as current.

Syntax

current_axis( ChipsId );
current_axis( "axis_id" );
current_axis( "all" );

Description

The current_axis command sets the axis indicated by the argument as the current axis; see "ahelp currency" for general information on currency.

  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • axis_id - identification tag given to each object that is created; use this to select a specific axis.
  • all - sets all axes to be current.

Use the info_current command to retrieve a list of all the current items in the ChIPS session, as shown in Example 1.

Example 1

chips> id = ChipsId();
chips> add_plot(.6, .6, .9, .9);
chips> add_curve([-4,0,4],[0,5,10]);
chips> add_plot();
chips> add_curve([-4:4],[-4:4]^2);
chips> current_plot("plot1");
chips> id.axis = "ax1";
chips> current_axis(id);
chips> info_current();

Two plots are created, each containing a curve, then the first plot is set as current. The id.axis command sets the axis value of the ChipsId structure to the y-axis of the first plot, then the current_axis command makes that axis current.

The output of info_current for this session is:

Window [win1]
  Frame [frm1]
    Plot [plot1]
        X Axis [ax1]
        Y Axis [ay1]
        Curve [crv1]
   Coord Sys [Data]
   Coord Sys ID [plot1_ax1ay1]

Example 2

chips> id = ChipsId();
chips> add_plot(.6, .6, .9, .9);
chips> add_curve([-4,0,4],[0,5,10]);
chips> add_plot();
chips> add_curve([-4:4],[-4:4]^2);
chips> current_plot("plot1");
chips> current_axis("all");

Two plots are created, each containing a curve, then the first plot is set as current. The current_axis command then sets all axes in that plot as current.

Example 3

chips> id = ChipsId();
chips> add_plot(.6, .6, .9, .9);
chips> add_curve([-4,0,4],[0,5,10]);
chips> add_plot();
chips> add_curve([-4:4],[-4:4]^2);
chips> current_plot("all");
chips> current_axis("all");

Two plots are created, each containing a curve, then all plots are made current. The current_axis command then sets all axes in all plots as current.

CHANGES IN CIAO 4.1

The ability to set border axes as the current axis has been removed, as it will cause problems with coordinate systems.

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

Last modified: December 2008



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.