Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 14 December 2016

How do I add grid lines at the major or minor tick positions?


The majortick.grid and minortick.grid sections of the axis attribute settings control the appearance of grid lines:

chips> get_xaxis().majorgrid
           
color = default
style = 6
thickness = 1.0
visible = False
chips> get_xaxis().minorgrid
           
color = default
style = 2
thickness = 1.0
visible = False

The set_axis set of commands can be used to show, or hide, the grids. In the following we turn on just the major grid and then both grids for both axes; if set_xaxis or set_yaxis had been used then this would have been limited to the X or Y axis respectively.

chips> set_axis(["majortick.visible", True])
chips> set_axis(["majortick.visible", True, "minortick.visible", True])

Here are two examples taken from the ChIPS gallery:

[The X axis is logged and the Y axis is linear; both have blue dotted grid lines at the minor tick positions and black dashed lines at the major grid positions] [The contoured image of Abell 2142 is displayed in WCS coordinates and a brown dashed line is drawn at the major tick positions for both axes]

The ChIPS GUI

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: 14 December 2016
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:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.