Last modified: 12 December 2018

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 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.