Insert: Straight Line
Add a vertical or horizontal line to graph layer
Minimum Origin Version Required: 9.0
addline type:=1 value:=12 select:=1 name:=vline1;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Type | type |
Input int |
|
Specify which line to add, vertical or horizontal.
Option list:
|
At Value | value |
Input double |
|
Specify the position of the added line in units of X Axis Scale (for Vertical Line) or Y Axis Scale (for Horizontal line). For categorical values, enter the index of desired category in categorical list to add line at that particular category. See example below for details.
You are also allowed to enter a LabTalk expression or an expression that incorporates one of Origin's built-in statistical functions, see the details here. |
Color | color |
Input int |
|
Specify the color of the added line. |
Style | style |
Input int |
|
Specify the style of the added line.
Option list:
|
Label Display Format | format |
Input string |
|
Specify the label display format. |
Label Location | location |
Input int |
|
Specify the label location.
Option list:
|
Selectable | select |
Input int |
|
Check this check box to allow the line to be selectable on graph.
If an object is made non-selectable it can be removed via script:
|
Moveable | move |
Input int |
|
Check this check box to allow the line to be moved on graph.
If an object is made non-moveable it can be removed by selecting it, right click and select Properties... to enter a new position on the Coordinates tab of the Object Properties dialog that opens. |
Name | name |
Input string |
|
Specify the line name. |
This X-Function can be used to add vertical or Horizontal line on the graph.
This example will show you how to add a vertical line in a graph with categorical axis.