|
|
|
|
SynopsisReturns a string containing a listing of objects at the specified depth. Syntaxinfo_depth( [ChipsId,] [depth] ); Description
The info_depth command provide a means of seeing what objects are at various depths; see "ahelp sl.chips depthcontrol" for more information on depth. The command returns a string that contains each depth accessed and the objects which are at that depth. A depth has been accessed if an object ever resided at that depth, even if there aren't any objects currently set to that depth. The general format of the output string for each line is: the object type (Window, Frame, Plot, Coord Sys Id, etc.), a space, an open square bracket, the id of the object, and a close square bracket. An indentation before the object type shows that the object belongs to the object preceding it. The window and frame objects are listed first. Under the frame, each depth is listed with its depth number. If the depth is hidden, the text "(hidden)" is included after the depth number. Under each depth are the objects which are located at that depth. Objects are listed in the order in which they were created within their context. There are two exceptions to this format:
Viewing a Specific DepthA depth may be specified in the info_depth command, causing only objects at that depth to be included in the output string. Using a ChipsIdA ChipsId may be included to refine the context from which information will be displayed. Setting the window or frame member of a ChipsId and calling info_depth with that id will return information pertaining only to the specified window or frame. (Currently this feature only works with windows and frames.) The info command supports preferences that are not available in info_depth; refer to "ahelp sl.chips info" for details. Example 1chips> add_curve([0:9], [0:9]); chips> info_depth();
Window [win1]
Frame [frm1]
Depth 100
label [title (plot1)]
axis [bx1 (plot1)]
axis [bx2 (plot1)]
axis [by1 (plot1)]
axis [by2 (plot1)]
axis [ax1 (plot1)]
axis [ay1 (plot1)]
curve [crv1 (plot1)]
Print the info_depth results after adding a simple curve. The output shows that the curve, axes, and label were all added at the default depth of 100. Example 2chips> add_curve([5.25,6.25,7.25,8.25,9.25], [1,-1,5,7,6], "line.color=red symbol.color=red depth=110"); chips> add_histogram([1,-1,5,7,6], [5,6,7,8,9], [5.5,6.5,7.5,8.5,9.5]); chips> add_label(5,6, "Curve and Histogram"); chips> add_frame(); chips> add_label(.1,.9, "New Curve", "depth=110 color=red size=20"); chips> add_curve(cos([0:2*PI:.1]), sin ([0: 2*PI:.1]), "plot.id=myplot plot.topmargin=.095 depth=50"); chips> hide_depth(110); chips> info_depth();
Window [win1]
Frame [frm1]
Depth 100
label [title (plot1)]
axis [bx1 (plot1)]
axis [bx2 (plot1)]
axis [by1 (plot1)]
axis [by2 (plot1)]
axis [ax1 (plot1)]
axis [ay1 (plot1)]
histogram [hist1 (plot1)]
label [lbl1]
Depth 110
curve [crv1 (plot1)]
Frame [frm2]
Depth 50
curve [crv1 (myplot)]
Depth 100
label [title (myplot)]
axis [bx1 (myplot)]
axis [bx2 (myplot)]
axis [by1 (myplot)]
axis [by2 (myplot)]
axis [ax1 (myplot)]
axis [ay1 (myplot)]
Depth 110 (hidden)
label [lbl1]
The depth info from a slightly more complicated ChIPS session includes several plots, curves, and annotations. Depth 110 in frame 'frm2' is hidden, which is indicated by the "(hidden)" text. Example 3chips> id = ChipsId; chips> add_curve(id, [0:9], [0:9], "depth=50"); chips> add_histogram([1,2,3], [4,5,6], "id=\"my hist\" depth=50"); chips> add_label(1,8, "Curve and Histogram"); chips> add_frame(); chips> add_label(.1,.95, "New Curve"); chips> add_curve([0:2*PI], sin ([0: 2*PI]), "depth=50"); chips> info_depth(id);
Window [win1]
Frame [frm1]
Depth 50
curve [crv1 (plot1)]
histogram [my hist (plot1)]
Depth 100
label [title (plot1)]
axis [bx1 (plot1)]
axis [bx2 (plot1)]
axis [by1 (plot1)]
axis [by2 (plot1)]
axis [ax1 (plot1)]
axis [ay1 (plot1)]
label [lbl1]
Display the depths of objects which are in the window and frame described by the ChipsId, namely 'win1' and 'frm1'. The ChipsId is populated by passing it to the add_curve command. Example 4chips> add_contour([[1,1,1],[1,3,1],[1,1,1]], 3,3); chips> add_curve([1,2,3,4], [1,2,1,2], "depth=75"); chips> add_hline(1.5,"color=red depth=75"); chips> add_frame(); chips> add_label(.1, .95, "Simple Contour", "depth=75"); chips> info_depth(75);
Window [win1]
Frame [frm1]
Depth 75
curve [crv1 (plot1)]
line [line1]
Frame [frm2]
Depth 75
label [lbl1]
Display all objects which have a depth of 75. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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. |