Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 13 April 2018

Can I change the position or number of major or minor tick marks?

The majortick and minortick sections of an axis contain a mode field which is used to determine the position of the tick marks.

chips> get_xaxis().majortick
color = default
count = 6
interval = 10.0
length = 4
mode = limits
style = inside
thickness = 1.0
visible = True
chips> get_xaxis().minortick
color = default
count = 4
interval = 5.0
length = 2
mode = nice
style = inside
thickness = 1.0
visible = True

The available modes for major ticks are discussed below; for the minor ticks, the arbitrary and limits modes have no effect and the mode is not automatically changed when the .count or .interval settings are changed.


This is the default mode and the axis limits are determined by the user, with the major tick positions automatically calculated from this range.


The major tick marks are positioned at intervals given by the majortick.interval attribute, starting from zero. As a convenience, the set_axis family of commands will change the mode to "interval" if the interval setting is changed, as in the following:

chips> set_xaxis(["majortick.interval", 20])
chips> get_xaxis().majortick.mode

An example of its use is given in the ChIPS gallery.


The count displays a fixed number of major tick marks, defined by the majortick.count attribute, within the given range; as with the interval mode you can change the mode by setting this attribute:

chips> set_xaxis(["majortick.count", 4])
chips> get_xaxis().majortick.mode

As the display is forced to start and end on a major tick mark in this mode; setting or changing the majortick.count setting may change the display range of the axis. An example of its use is given in the ChIPS gallery.


This acts like the count mode, in that the axis range starts and ends on a major tick mark, but it attempts to guess the best number of major tick marks to display given the current axis range.


This setting allows you to supply your own positions and labels for an axis, by using the set_arbitrary_tick_positions routine. An example of its use is given in the ChIPS gallery.


The ChIPS GUI makes it easy to modify a visualization using your mouse, rather than Python functions. The GUI can also be used to add annotations - such as labels, lines, points and regions - and to zoom or pan into plots.

Last modified: 13 April 2018
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.