Layer.Axis.Label

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:

layerObject.Axis.label.property

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.


Properties

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
numeric

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

layer.axis.label.color Read/write
numeric

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
string

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
numeric

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

layer.axis.label.divideBy Read/write
numeric

Divide tick labels by this factor before displaying.

layer.axis.label.font Read/write
numeric

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

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

layer.axis.label.offsetH Read/write
numeric

Horizontal offset from axis, in % of current font.

layer.axis.label.offsetV Read/write
numeric

Vertical offset from axis, in % of current font.

layer.axis.label.pre$ Read/write
string

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

layer.axis.label.pt Read/write
numeric

Size of the tick labels in pts.

layer.axis.label.rotate Read/write
numeric

Tick label rotation, in degrees.

layer.axis.label.suf$ Read/write
string

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

layer.axis.label.timeFormat Read/write
numeric

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
numeric

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
numeric

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

layer.axis.label.wrap

(Origin 2015 SR0)

Read/write
numeric

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


Example

This script rotate the x label of active layer:

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