Last modified: 12 December 2018

How do I change the appearance/location of the axis ticklabels?


Note: the axis ticklabel refers to the (normally) numeric labels drawn at the major tick marks on an axis.

The axis ticklabel attributes control the appearance of the labels drawn at the major tick marks, apart from the format, which is discussed in the How do I change the format of the axis ticklabels? entry.

chips> get_xaxis().ticklabel
         
angle = 0.0
color = default
font = helvetica
fontstyle = normal
halign = -99.0
offset = 6
size = 12
style = outside
valign = -99.0
visible = True

Here we use the commands to change the size, color, and position of the ticklabels:

[The x axis ticklabels are blue whilst the y axis are rotated to be parallel with the axis]
chips> add_curve([1, 5, 10], [4.1e3, 9.5e3, 140.2e3], ["line.style", "noline"])
chips> log_scale(Y_AXIS)
chips> opts = get_xaxis()
chips> opts.ticklabel.color = "blue"
chips> opts.ticklabel.offset = 10
chips> set_xaxis(opts)
chips> set_yaxis(["ticklabel.angle", 90, "ticklabel.offset", 15, "ticklabel.halign", 0.5])
chips> set_axis(['ticklabel.size', 18])

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.