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 2007

URL: http://cxc.harvard.edu/chips4.0/set_axis.sl.html
AHELP for ChIPS 4.0 set_axis Context: sl.chips

Synopsis

Modifies the attributes of an existing axis.

Syntax

set_axis([id,] values);

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to modify an axis within the current plot.
  • values - a list containing attribute value pairs or a ChipsAxis object.

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 Axis

There 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 sl.chips attributes" and "ahelp sl.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:

Attribute Description Options Default
automin Should the axis automatically reset its minimum when a curve/contour/histogram is added? see the Booleans section of "ahelp sl.chips chipsopt" true
automax Should the axis automatically reset its maximum when a curve/contour/histogram is added? see the Booleans section of "ahelp sl.chips chipsopt" true
color Color of the axis base line segment see the Color section of "ahelp sl.chips chipsopt" default
depth Integer value indicating axis depth see the Depth section of "ahelp sl.chips chipsopt" 100
label.angle Angle of the axis label -360:360 0
label.color Color of the axis label see the Color section of "ahelp sl.chips chipsopt" default
label.font Font for the axis label text see the Font section of "ahelp sl.chips chipsopt" helvetica
label.fontstyle Style of the axis label text see the Font Style section of "ahelp sl.chips chipsopt" normal
label.halign Horizontal location of the string reference point of the axis label see the Text Alignment section of "ahelp sl.chips chipsopt" center
label.size Font size of the axis label 1:100 14
label.valign Vertical location of the string reference point of the axis label see the Text Alignment section of "ahelp sl.chips chipsopt" center
label.visible Is the label visible or hidden? see the Booleans section of "ahelp sl.chips chipsopt" true
majortick.color The color to use for major ticks see the Color section of "ahelp sl.chips chipsopt" default
majortick.count Default number of ticks to display when major mode is count see the Tick Mode section of "ahelp sl.chips chipsopt" 4
majortick.interval Spacing to use between ticks when major mode is interval see the Tick Mode section of "ahelp sl.chips chipsopt" 10
majortick.length Length of major ticks Non-negative integer 1
majortick.mode Mode of the axis tickmark positioning see the Tick Mode section of "ahelp sl.chips chipsopt" limits
majortick.style Style of the axis tickmarks see the Tick Style section of "ahelp sl.chips chipsopt" inside
majortick.thickness Thickness of major ticks 0.5:10 1
majortick.visible Are major ticks visible or hidden? see the Booleans section of "ahelp sl.chips chipsopt" true
majorgrid.color Color of the axis major grids see the Color section of "ahelp sl.chips chipsopt" default
majorgrid.style Stipple pattern used to draw the axis major grids see the Line Style section of "ahelp sl.chips chipsopt" shortdash
majorgrid.thickness Thickness of the axis major grids 0.5:10 1
majorgrid.visible Should major grids be visible? see the Booleans section of "ahelp sl.chips chipsopt" false
minortick.color The color to use for minor ticks see the Color section of "ahelp sl.chips chipsopt" default
minortick.count Default number of ticks to display when minor mode is count see the Tick Mode section of "ahelp sl.chips chipsopt" 4
minortick.interval Spacing to use between ticks when minor mode is interval see the Tick Mode section of "ahelp sl.chips chipsopt" 10
minortick.length Length of minor ticks Non-negative integer 1
minortick.mode Mode of the axis tickmark positioning see the Tick Mode section of "ahelp sl.chips chipsopt" limits
minortick.style Style of the axis tickmarks see the Tick Style section of "ahelp sl.chips chipsopt" inside
minortick.thickness Thickness of minor ticks 0.5:10 1
minortick.visible Are minor ticks visible or hidden? see the Booleans section of "ahelp sl.chips chipsopt" true
minorgrid.color Color of the axis minor grids see the Color section of "ahelp sl.chips chipsopt" default
minorgrid.style Stipple pattern used to draw the axis minor grids see the Line Style section of "ahelp sl.chips chipsopt" dot
minorgrid.thickness Thickness of the axis minor grids 0.5:10 1
minorgrid.visible Should minor grids be visible? see the Booleans section of "ahelp sl.chips chipsopt" false
offset.parallel Axis label offset from axis start (-.5) to axis end (.5) -0.5:0.5 0
offset.perpendicular Axis label offset from axis baseline in pixels -100:100 40
pad The percentage of padding to add to an axis in arbitrary|limits|interval modes Non-negative decimal 0.05
thickness Thickness of the axis 0.5:10 1
tickformat Print format for axis ticklabels see the Tick Format section of "ahelp sl.chips chipsopt" %g
ticklabel.angle Angle of the axis ticklabel -360:360 0
ticklabel.color Color of the axis ticklabels see the Color section of "ahelp sl.chips chipsopt" default
ticklabel.font Font for the axis ticklabel text see the Font section of "ahelp sl.chips chipsopt" helvetica
ticklabel.fontstyle Style of the axis ticklabel text see the Font Style section of "ahelp sl.chips chipsopt" normal
ticklabel.halign Horizontal location of the string reference point of the axis ticklabel see the Text Alignment section of "ahelp sl.chips chipsopt" center
ticklabel.offset Offset of ticklabels to axis base (in pixels) Non-negative value 6
ticklabel.size Font size of the axis ticklabel 1:100 12
ticklabel.style Style of the axis ticklabels see the Tick Style section of "ahelp sl.chips chipsopt" outside
ticklabel.valign Vertical location of the string reference point of the axis ticklabel see the Text Alignment section of "ahelp sl.chips chipsopt" center
ticklabel.visible Is the ticklabel visible or hidden? see the Booleans section of "ahelp sl.chips chipsopt" true

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 1

chips> 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 = 1;
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>a =struct {color, tickformat};
chips>a.color="sienna",a.tickformat="%2.1d kev";
chips>set_axis("ay1",a);

Create a user-defined structure with color and tickformat fields. Use the structure to modify the values of the axis 'ay1'.

Bugs

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

Last modified: December 2007



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.