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

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/label.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 label Context: chips

Synopsis

Adds a label to a drawing area and/or changes label attributes.

Syntax

chips> [D #] LABEL <xcoor> <ycoor> "<text>"

Description

To change label attributes:

chips> [D #] {L # | LABEL} "<text>"
chips> [D #] L # <xcoor> <ycoor>
chips> [D #] {L # | LABEL} ANGLE <rot_angle>
chips> [D #] {L # | LABEL} <color>
chips> [D #] {L # | LABEL} SIZE <size_value>

The LABEL command can take many arguments:

Argument: <color>
Description: label color
Options: BLACK, BLUE, CYAN, DEFAULT, GREEN, MAGENTA, RED, WHITE, YELLOW
Default: DEFAULT (appears in ChIPS window as white; prints as black)
Argument: D #
Description: drawing area number designation
Options: integer numbers
Default: current drawing area

See the D command for more information about this argument.

Argument: L #
Description: label number designation
Options: integer numbers
Default: current label
Argument: <rot_angle>
Description: rotation angle in degrees
Options: real numbers
Default: 0.0
Argument: <size_value>
Description: label size
Options: real numbers
Default: 1.0
Argument: <text>
Description: the text for the label, which must be in quotes 
             (" ").  The <text> may contain TeX syntax
             for formatting text, creating mathematical expressions,
             and mixing font settings.
Options: quoted character string
Argument: <xcoor>
Description: X coordinate of start location for label
Options: real numbers
Argument: <ycoor>
Description: Y coordinate of start location for labels
Options: real numbers

If <xcoor> and <ycoor> are not included, the current label is replaced. These arguments must be included when adding the first label.

CIAO allows some plot attributes to be changed using the ChIPS state object and resource file. See "ahelp chips" for further details.

Example 1

chips> CURVE data/exampleB.dat
chips> D 1 LABEL 5.0 1.2 "Label"

After a curve has been plotted, a label is added at position (5.0, 1.2).

Example 2

chips> D 1 LABEL "NewLabel"

The text of the label created in the previous example is replaced with "NewLabel".

Example 3

chips> D 1 LABEL 10.0 3.0 "x = \frac{y+z/2}{y^{2}+3}"

A mathematical label is added at position (10.0, 3.0) by using TeX syntax.

Example 4

chips> D 1 LABEL 10.0 1.5 "\oe This \rm is \gr Greek"

This LABEL command utilizes TeX syntax in order to achieve mixed font settings in the same plot. The command produces a label where "This" is in Old English font, "is" is in Roman font, and "Greek" is in the Greek font.

Example 5

chips> CLEAR
chips> CURVE data/exampleB.dat
chips> D 1 LABEL 5.0 1.2 "Label"
chips> L 1
chips> LABEL ANGLE 45.0
chips> L 1 10.0 1.2
chips> LABEL SIZE 2.0

A curve is plotted and labeled. The angle of the label is changed to 45 degrees, then it is moved and increased in size.

Example 6

chips> LABEL 5.0 3.0 "Label 3"
chips> LABEL 5.0 1.5 "Label 4"
chips> L 2,3 ANGLE 45.0
chips> L 1:3 SIZE 1.5

Two more labels are added to the plot from the previous example, then the command L 2,3 ANGLE 45.0 changes the angle of both of them to 45 degrees. The final command changes the size of labels numbered 1 through 3 (all labels in this case) to 1.5.

Bugs

See the bugs page for ChIPS on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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.