|
|
|
|
Concepts: Entity CreationChIPS uses a hierarchical approach to constructing plots. Any number of windows may exist, and each window may contain zero or more frames. The frames contain plots and annotations, such as regions and labels. The plots contain any axes, curve, contours, and histograms. Graphically, the layout looks like:
WINDOWS--------------------------+
| FRAMES-------------------+ |
| | LABELS | |
| | LINES | |
| | PLOTS -----------+ | |
| | | AXES | | |
| | | CONTOURS | | |
| | | CURVES | | |
| | | HISTOGRAMS | | |
| | +----------------+ | |
| | POINTS | |
| | REGIONS | |
| +------------------------+ |
+--------------------------------+
In order to display a curve, ChIPS must have a window which contains a frame. The frame must contain a plot, and the plot in turn contains a pair of axes and the curve. The user may create each level of the hierarchy if fine control is desired: # Python
add_window(4,4,"inches")
add_frame(.1,.1,.9,.9,"bgcolor=beige")
add_plot(.2,.2,.8,.8)
add_axis(XY_AXIS,0,1,10)
add_curve(xdat, ydat)
% S-Lang
add_window(4,4,"inches");
add_frame(.1,.1,.9,.9,"bgcolor=beige");
add_plot(.2,.2,.8,.8);
add_axis(XY_AXIS,0,1,10);
add_curve(xdat, ydat);
However, this level of detail is not required. ChIPS is designed to create container objects - such as windows, frames, or plots - if they are needed to create the new object. The above example may be reduced to simply: # Python
add_curve(xdat, ydat)
% S-Lang
add_curve(xdat, ydat);
ChIPS creates the window, frame, plot, and axes before creating the curve, as seen with the info command ("ahelp info"):
Window [win1]
Frame [frm1]
Plot [plot1] (0.15,0.15) .. (0.90,0.90)
Border bottom [bx1] top [bx2] left [by1] right [by2]
X Axis [ax1]
Y Axis [ay1]
Curve [crv1]
|
![]() |
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. |