|
|
|
|
SynopsisCreates a label. Syntaxadd_label( [ChipsId,] xpos, ypos, text [,attributes]); Description
The add_label command creates a label whose attributes are specified by user preferences or in an attribute list. The new label becomes current by default; providing a ChipsId overrides the currency state. The position of the label is specified as a coordinate pair (xpos, ypos) in data, pixel, frame, or plot normalized coordinates. Labels specified in data coordinates will only be displayed if the are within the coordinate system range. AlignmentAlignment attributes control how the text string is situated in relation to the reference position. Horizontal alignment can be specified as left (0), center (.5), right (1), or a numeric ratio of the text length. Vertical alignment is similarly controlled: bottom (0), center (.5), top (1), or a numeric ratio. Customizing the LabelThere are several attributes that control the label characteristics. The attributes can be set to the ChIPS defaults, values provided in the add_label command, or values from the user's preference file. The attributes may also be modified with the set_label command at any time; see "ahelp set_label" and "ahelp setget" for more information. The attributes associated with labels are:
Example 1
chips> add_label(.4,.5,"area={\\pi}r^2");Add a label at position (.4,.5). Latex formatting is used in the label text. Example 2chips> settings = ChipsLabel; chips> settings.color = "blue"; chips> settings.size = 8.0; chips> settings.stem = "MyLabel"; chips> add_label(100,100,"Figure A",settings); Populate the "settings" structure with the attribute values, then add the label "Figure A". Example 3
chips> add_label(100,100,"Fig. B",{"color", "blue", "size", "8" });Create a blue label, specifying the attribute values in a list. CHANGES IN CIAO 4.1coordsys keyword added to attributesThe attribute "coordsys" sets the coordinate system when the object is created. ChipsIds still can be used to set coordinate systems. If a ChipsId and coordsys attribute are both provided, the coordsys value takes precedence. 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. |