|
|
|
|
SynopsisModifies the attributes of an existing label. Syntaxset_label([id,] values) Description
The set_label command sets the specified attributes to the provided values. The modified label becomes current. Multiple labels may be modified with a single command by setting the currency to "all". Customizing the LabelThere are several attributes that control the characteristics of labels. The set_label command may be used to modify the attribute values of an existing label at any time during a ChIPS session. See "ahelp py.chips attributes" and "ahelp py.chips setget" for more general information. If multiple attributes are being set simultaneously and one of them fails, the entire command will fail and the label will not be modified. The attributes associated with labels are:
These individual commands are also available for setting attribute values: set_label_angle set_label_color set_label_depth set_label_font set_label_fontstyle set_label_halign set_label_size set_label_text set_label_valign Example 1chips> set_label(["color","plum", "size", 16]) Using attribute/value pairs, set the label color to plum and font size to 16. Example 2
chips> settings = ChipsLabel()
chips> settings.color = 'blue'
chips> settings.angle = 45
chips> settings.font = 'greek'
chips> set_label('lbl1',settings)Populate the "settings" structure with the attribute values, then use it to set lbl1 to have blue text in the greek font at a 45 degree angle. Example 3chips> class labprop: chips> def __init__(self): chips> self.color='lime' chips> self.fontstyle='italic' chips> set_label(labprop()) Create a user-defined structure with color and fontstyle fields. Use the structure to modify the values of the current label. 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. |