# 3.7.5.31 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
numeric

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

numeric

Specify the position value of refline#.

numeric

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

numeric

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

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);

numeric

Specify the line type for refline#.

numeric

Specify the line thickness in pts for refline#

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

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);.

numeric

Customize the fill color transparency in percentage.

numeric

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

numeric

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

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;