The label object is a sub-object of the layer axis object. And axis is a sub-object of layer object. You can use range notation to define a layer object:

range layerObject = [pageName]layerName!

And then access the axis object by:


Where Axis is the axis specification: X is the bottom X axis, X2 is the top X axis, Y is the left Y axis, Y2 is the right Y axis, Z is the front Z axis, Z2 is the back Z axis, Zh is the ZhX axis, Zh2 is the back ZhY axis, and Zh3 is the back ZhZ axis.


Here, axis is a placeholder for x, y or z and axis2 is a placeholder for x2, y2 or z2.

Property Access Description
layer.axis.label.bold Read/write

Bold the tick labels: 1 = enable, 0 = disable.

layer.axis.label.color Read/write

Tick label color. Numbers from the color list, or transparent (0). The color function can be used, as in: layer.x.color = color(blue); layer.y2.color = color(240,208,0);

layer.axis.label.dataset$ Read/write

Dataset name if the tick label is from a dataset. To read, assign the value to a string variable.

layer.axis.label.decPlaces Read/write

Number of decimal points to display. To disable, set to -1.

layer.axis.label.divideBy Read/write

Divide tick labels by this factor before displaying.

layer.axis.label.font Read/write

Font number as enumerated by Windows except 1 indicates use setting in Tools : Options : [Text Fonts] : Default. Use the font( ) function, as in: layer1.x.label.font = font(arial); to set to Arial font.

layer.axis.label.formula$ Read/write
Display tick labels by the formula specified. For example, use: layer.x.label.formula$="x*2"; to double the values of x axis tick label. ("x" is also used in the formula for Y and Z axes.)
layer.axis.label.numFormat Read/write

Numeric display format: 1 = decimal without commas, 2 = scientific, 3 = engineering, and 4 = decimal with commas (for date).

layer.axis.label.offsetH Read/write

Horizontal offset from axis, in % of current font.

layer.axis.label.offsetV Read/write

Vertical offset from axis, in % of current font.

layer.axis.label.pre$ Read/write

A string to display before each tick label. To delete the prefix, set .pre$ = "";.

layer.axis.label.pt Read/write

Size of the tick labels in pts.

layer.axis.label.rotate Read/write

Tick label rotation, in degrees.

layer.axis.label.suf$ Read/write

A string to display after each tick label. To delete the suffix, set .suf$ = "";.

layer.axis.label.timeFormat Read/write

Tick label time and date format.
If layer.axis.label.type = 4, 1 = first selection from date format drop-down list (Windows Short Date format), 2 = second selection from date format drop-down list (Windows Long Date format), etc.
If layer.axis.label.type = 3, 1 = first selection from time format drop-down list, 2 = second selection from time format drop-down list, etc.

layer.axis.label.type Read/write

Tick label type: 1 = numeric, 2 = text from dataset, 3 = time, 4 = date, 5 = month, 6 = day of the week, 7 = column headings, and 8 = dataset indexed as tick #.

layer.axis.label.whiteout Read/write

Background for tick labels: 0 = transparent background, 1 = white background.


(Origin 2015 SR0)


Enable wrapping of axis tick labels: 0 = Disable, 1 = Enable.


This script rotate the x label of active layer:

range ll = !;
ll.x.label.rotate = 45;