About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: 20 May 2008
Hardcopy (PDF): A4 | Letter

How do I select an object (change currency)?


There are several ways that currency can be changed:

current_<object>()
# Python
  current_curve("crv1")
% S-Lang
  current_curve("crv1");

will change the current curve to "crv1" in the current plot. The list of current_<object> commands is: current_axis(), current_contour(), current_curve(), current_frame(), current_histogram(), current_label(), current_line(), current_plot(), current_point(), current_region(), and current_window().

set_current()

The set_current() routine can be used to change the currency to a given object by specifying its type and name. The example below changes the current curve to "crv1":

# Python
  set_current(chips_curve,"crv1")
% S-Lang
  set_current(chips_curve,"crv1");
set_<object>()

Changing an attribute of an object changes the currency to that object. So the following

# Python
  id = ChipsId()
  id.plot = "plot1"
  id.curve = "crv2"
  set_curve(id,["line.color","red"])
% S-Lang
  id = ChipsId;
  id.plot = "plot1";
  id.curve = "crv2";
  set_curve(id,{"line.color","red"});

sets the line color of the curve called crv2 in plot plot1 to red, and makes this plot and curve current.

add_<object>()

Creating an object - via add_<object>() or make_figure() - will make that object current.

delete_<object>()

Deleting a curve will change the currency back to the last curve to be current in that plot.

Further information can be found in the Currency Concept documentation.



Hardcopy (PDF): A4 | Letter
Last modified: 20 May 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.