|
|
|
|
SynopsisModifies the attributes of an existing axis. Syntaxset_axis([id,] values) Description
The set_axis command sets the specified attributes to the provided values. The modified axis becomes current. Unless an axis id is specified, the command operates on the current axes (both x axis and y axis). An individual axis may also be modified with set_xaxis and set_yaxis commands. Customizing the AxisThere are several attributes that control the characteristics of axes. The set_axis command may be used to modify the attribute values of an existing axis 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 axis will not be modified. The attributes associated with axes are:
These individual commands are also available for setting attribute values: set_axis_automax set_axis_automin set_axis_color set_axis_depth set_axis_label_angle set_axis_label_color set_axis_label_font set_axis_label_fontstyle set_axis_label_halign set_axis_label_size set_axis_label_valign set_axis_label_visible set_axis_major_color set_axis_major_interval set_axis_major_length set_axis_major_mode set_axis_major_num set_axis_major_style set_axis_major_thickness set_axis_majorgrid_color set_axis_majorgrid_style set_axis_majorgrid_thickness set_axis_majorgrid_visible set_axis_minor_color set_axis_minor_interval set_axis_minor_length set_axis_minor_mode set_axis_minor_num set_axis_minor_style set_axis_minor_thickness set_axis_minorgrid_color set_axis_minorgrid_style set_axis_minorgrid_thickness set_axis_minorgrid_visible set_axis_pad set_axis_parallel_offset set_axis_perpendicular_offset set_axis_text set_axis_thickness set_axis_tickformat set_axis_ticklabel_angle set_axis_ticklabel_color set_axis_ticklabel_font set_axis_ticklabel_fontstyle set_axis_ticklabel_halign set_axis_ticklabel_offset set_axis_ticklabel_size set_axis_ticklabel_style set_axis_ticklabel_valign set_axis_ticklabel_visible set_axis_tickstyle Example 1chips> set_axis(["color","lavender", "thickness", 2, "tickformat", "%2.1z"]) Using attribute/value pairs, set the x and y axis color to lavender, the thickness to 2, and the tickformat style to use n * 10^x notation. Example 2
chips> settings = ChipsAxis()
chips> settings.color = 'steelblue'
chips> settings.ticklabel.angle = 45
chips> settings.ticklabel.halign = 'right'
chips> settings.majorgrid.visible = True
chips> set_axis('ax1',settings)Populate the "settings" structure with the attribute values, then use it to set axis ax1 to have visible major grids, right-justified tick labels rotated at 45 degrees, and a steelblue baseline color. Example 3
chips> class axprop:
chips> def __init__(self):
chips> self.color='sienna'
chips> self.tickformat='%2.1d kev'
chips> set_axis('ay1',axprop())Create a user-defined structure with color and tickformat fields. Use the structure to modify the values of the axis 'ay1'. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. See Also
|
![]() |
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. |