3.7.5.32 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.align Read/write
numeric

Align the tick labels with respect to tick marks: 1 = Center (on tick), 2 = Center between Ticks, 3 = Next to Ticks.

layer.axis.label.bold Read/write
numeric

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

layer.axis.label.collabel
(Origin 2019b)
Read/write
numeric

Specify tick label display format when layer.axis.label.type = 7 (Column Name or Label) or 11 (Layer Banner): 1 = Column headings, 3 = Unit, 4 = Comments, 5 = Sampling Interval, 6 = Parameters, 7 = Parameters 2, 8 = Parameters 3, 9 = Parameters 4, 10 = Parameters 5, 32 = <Custom>

layer.axis.label.collabel$
(Origin 2019b)
Read/write
string

Specify the display format string of tick label when layer.axis.label.type = 7 (Column Name or Label) or 11 (Layer Banner), and layer.axis.label.collabel= 32 (<Custom>)

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.dir
(Origin 2022)
Read/write
numeric, string

Control the direction of the letters and numbers in axis labels: 1=Horizontal, 2=Vertical, 3=Stacked, 4=Horizontal Letters and Numbers in Vertical Text. See the details of Direction control.

layer.axis.label.divideBy
(Origin 2021)
Read/write
numeric, string

Divide tick labels by this factor before displaying.

%(?X) / %(layer.x.label.divideBy$)
layer.axis.label.font Read/write
numeric

Font number as enumerated by Windows except 1 indicates use setting in Preference: 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.labeln.pt
(Origin 2024b)
Read/write
numeric

Size of the tick labels in pts. If multi-line table, n refers to nth line in the table. If single line axis label, n can be omitted.

layer.axis.label.rotate Read/write
numeric

Tick label rotation, in degrees.

layer.axis.label.scientificnotationpower
(Origin 2022b)
Read/write
string

Power of the tick labels, shown as Unit for the labels.

layer.axis.label.scientificnotationpos
(Origin 2022b)
Read/write
string

Specify the position of the power unit for the axis tick labels: 0=hide the unit
1=Begin from Axis End //default value
2=in Last Tick Label
3=End at Axis End
4=Center

layer.axis.label.scientificnotationxoffset
(Origin 2022b)
Read/write
string

Specify the horizontal offset for the unit label from the specified position. The offset unit likes tick label offset.

layer.axis.label.scientificnotationyoffset
(Origin 2022b)
Read/write
string

Specify the vertical offset for the unit label from the specified position. The offset unit likes tick label offset.

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, 8 = dataset indexed as tick #, 11 = Layer Banner

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;