Layer.Axis.Reflines

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.reflines.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.

Also refer to the sub-object: layer.axis.refline object

Required Version: Origin 2017 SR0

 

Properties

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

Property Access Description
layer.axis.reflines.dataset$ Read/write
string

Specify the reference line locates, can be a set of space-separated values or a reference column from worksheet.

layer.axis.reflines.alternate Read/write
numeric

Wheter to fill color between reference lines:
0 = do not fill color between reference lines.
1 = fill the area between every odd number reference line and its next even number reference line, such as refline1 - refline2, refline3 - refline4.

layer.axis.reflines.beginend Read/write
numeric

Whether to include axis Begin line and axis End line when fill color between reference lines:
0 = do not include axis Begin line and axis End line
1 = including Axis Begin and Axis End lines. The filling order is Axis Begin to refline1. Axis End will be the last fill to if the custom line number is even.

layer.axis.reflines.count Read/write
numeric

Specify the number of reference lines to add. The reference lines are referred to as refline1, refline2... sequentially.

layer.axis.reflines.lineshow Read/write
numeric

Wheter to show reference lines: 0 = do not show label, 1 = show label.

layer.axis.reflines.labelshow Read/write
numeric

Wheter to show labels of reference lines: 0 = do not show label, 1 = show label.

layer.axis.reflines.stats Read/write
numeric

Get/Add a reference line at Axis Value with statistical function.

Example

Create a scatter plot with row number, and then run the script to add reference lines at specified values:

layer.x.reflines.dataset$="2 4 7";
layer.x.reflines.lineshow = 1;
layer.x.reflines.labelshow = 1;