Layer.Axis.Refline

The reference line 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.refline#.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, # refers to the index of the reference line.

Also refer to the object: layer.axis.reflines object

Required Version: Origin 2017 SR0


Properties

Note: axis is a placeholder for x, y, x2, or y2.

Property Access Description
layer.axis.refline#.TYPE Read/write
numeric

Specify Axis Begin or Axis End reference line: 1 = Axis Begin, 2 = Axis End.

layer.axis.refline#.VALUE Read/write
numeric

Specify the position value of refline#.

layer.axis.refline#.LINESHOW Read/write
numeric

Whether to show refline#: 0 = hide, 1 = show.

layer.axis.refline#.LINEAUTO Read/write
numeric

Use auto format for refline# (follow the format of major grid lines). Set to 0 to disable auto formatting.

layer.axis.refline#.LINECOLOR Read/write
numeric

Specify the line color for refline#. The color function can be used, as in:

layer.x.refline1.LINECOLOR = color(blue);

layer.x.refline2.LINECOLOR = color(240,208,0);

layer.axis.refline#.LINESTYLE Read/write
numeric

Specify the line type for refline#.

layer.axis.refline#.LINETHICKNESS Read/write
numeric

Specify the line thickness in pts for refline#

layer.axis.refline#.FILLTONEXT Read/write
numeric

Specify the index number of reference line to which the area will be filled from the current refline#. Set to 0 to turn off fill pattern

layer.axis.refline#.FILLCOLOR Read/write
numeric

Customize the fill color. The color function can be used, as in:

layer.x.refline1.FILLCOLOR = color(Origin);.

layer.x.refline2.LINECOLOR = color(255,0,128);.

layer.axis.refline#.FILLTRANS Read/write
numeric

Customize the fill color transparency in percentage.

layer.axis.refline#.labelshow Read/write
numeric

Wheter to show label for refline#: 0 = do not show label, 1 = show label.

layer.axis.refline#.labelpos Read/write
numeric

Specify the label position: 0 = bottom, 1 = top, 4 = middle.

layer.axis.refline#.labeltext$ Read/write
string

Specify the text to be shown as label for refline#. The default setting is <value as entered>, which means showing the position value as labeh.

Example

The following scripts create a graph window, and then add and customize reference lines.

win -t p; //create a graph window
layer.x.reflines.count = 2;
layer.x.refline1.TYPE = 1;
layer.x.refline2.value = 4; //add a reference line at x = 4
layer.x.reflines.lineshow = 1;
layer.x.refline2.labelshow = 1;
layer.x.refline2.FILLTONEXT=1;
layer.x.refline1.FILLCOLOR=3;
layer.x.refline1.FILLTRANS=50;