|
|
|
|
SynopsisThe ChipsId structure is used to specify the currency state and coordinate system. DescriptionThe ChipsId object allows the user to set or modify the currency of ChIPS by specifying the ids of the windows, frames, plots, axes, curves, contours, histograms, labels, lines, points, and regions that the operation should affect. It also contains entries to specify coordinate systems and coordinate system ids. The ChipsId is optional and is generally the first parameter in the command. A complete list of ChipsId members is available at the end of this document. They are set as:
id = ChipsId();
id.window = "all";
id.curve = "crv1";
id.coord_sys = PLOT_NORM;
Object methods may be used to achieve the same results, e.g. id.set_window_id("all"). The available object methods, as well as convenience methods which operate on multiple members simultaneously, are listed at the end of this document. When a ChipsId object is passed to a command, only the information relevant to the command is utilized. For instance, the window and frame ids may be used when changing the color of a frame background, but the curve id setting is ignored. Blank entries in the ChipsId resolve to the default determined by currency rules ("ahelp currency") . Retrieving Object IdsThe ChipsId object also provides a means of retrieving the ids of objects created by add_<object> commands. If an add_curve call is made when no windows exist, a window, frame, plot, axes, and curve objects are all created. The appropriate entries in the input ChipsId object are populated with the object ids. The id information may be accessed by printing the ChipsId or via the id accessor methods, e.g. id.get_window_id(). The ids are only set when a new instance of the object is added. If a curve is added to an existing plot, only the curve id will be updated in the ChipsId object. Specifying Coordinate SystemsThe coord_sys entry in the ChipsId is used to specify the coordinate system to use when adding objects. For instance, to add a label in plot normalized coordinates, set the coord_sys entry to PLOT_NORM and include the ChipsId object in the add_label call:
id = ChipsId();
id.coord_sys = PLOT_NORM;
add_label(id, .5, .5, "mid");
Members of the ChipsId Object
Object Methods
Example 1
chips> add_label(.5,.5,"Hello","id=a");
chips> add_label(.6,.7,"My","id=b");
chips> add_label(.7,.8,"Friend","id=c");
chips> id=ChipsId;
chips> id.set_label_id("b");
chips> set_label_font(id, "greek");
chips> id.label="a";
chips> set_label_angle(id,45);Use a ChipsId to modify the currency of labels in several ways. Example 2chips> id=ChipsId; chips> add_curve(id,[1:4],[1:4]^2); chips> print(id); Add a curve, using a ChipsId object to retrieve the ids of all the objects that are created. Example 3chips> add_axis(XY_AXIS,.5,-50,50); chips> id=ChipsId; chips> add_point(20,20); chips> id.coord_sys = PIXEL; chips> add_point(id, 150,150); chips> id.coord_sys = PLOT_NORM; chips> add_point(id,.9,.2); Use the ChipsId Object to change the data system used for adding points from data coordinates to pixel coordinates, then to plot normalized coordinates. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. See Also
|
![]() |
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. |