2.5.15 layadd
Menu Information
Insert: New Layer(Axes)
Brief Information
Add a new layer to graph
Command Line Usage
1. layadd type:=topX;
2. layadd igp:=graph2 userdef:=1 bottom:=1 top:=1 linkto:=1 yaxis:=straight;
3. layadd userdef:=1 bottom:=0 top:=1 linkto:=1 xaxis:=custom x1:=X1+10 x2:=X2+50 yaxis:=custom y1:=20 y2:=70;
X-Function Execution Options
Please refer to the page for additional option switches when accessing the x-function from script
Variables
Display Name
|
Variable Name
|
I/O and Type
|
Default Value
|
Description
|
Input Graph
|
igp
|
Input
GraphPage
|
<active>
|
Specifies the graph to be manipulated.
|
Layer Type
|
type
|
Input
int
|
normal
|
Specifies the type of the layer to be added.
Option list
- normal: Bottom-X Left-Y
- The new layer will have a bottom X axis and a left Y axis.
- topx: Top-X (Linked Y Scale and Dimension)
- The new layer will have a top X axis, and its Y axis has been linked to the Y axis of active layer straightly(1 to 1), with the Unit been set to % of Linked Layer.
- righty: Right-Y (Linked X Scale and Dimension)
- The new layer will have a right Y axis, and its X axis has been linked to the active layer straightly(1 to 1), with the Unit been set to % of Linked Layer.
- lefty: Left-Y (Linked X Scale and Dimension)
- The new layer will have a left Y axis, and its X axis has been linked to the active layer straightly(1 to 1), with the Unit been set to % of Linked Layer.
- txry: Top-X Right-Y (Linked Dimension)
- The new layer will have a top X axis and a right Y axis that are linked to the active layer, with the Unit been set to % of Linked Layer.
- bxry: Bottom-X Right-Y (Linked Dimension)
- The new layer will have a bottom X axis and a right Y axis that are linked to the active layer, with the Unit been set to % of Linked Layer.
- inset: Inset (Linked Dimension)
- The new layer will be a linked inset for the active layer, with the Unit been set to % of Linked Layer.
- insetdata: Inset With Data (Linked Dimension)
- The new layer will be a linked inset for the active layer, and it will have the data plots from the active layer, with the Unit been set to % of Linked Layer.
- noxy: No Axes (Linked XY Scale and Dimension)
- The new layer has no axis, but its XY scale is linked to active layer straightly(1 to 1), with the Unit been set to % of Linked Layer.
|
User Defined
|
userdef
|
Input
int
|
0
|
Specifies whether or not users define the properties of the layer by themselves.
|
Bottom
|
bottom
|
Input
int
|
1
|
Specifies whether or not to show a bottom X axis. This variable is editable only when the type variable is set to User_Defined.
|
Left
|
left
|
Input
int
|
1
|
Specifies whether or not to show a left Y axis. This variable is editable only when the type variable is set to User_Defined.
|
Top
|
top
|
Input
int
|
0
|
Specifies whether or not to show a top X axis. This variable is editable only when the type variable is set to User_Defined.
|
Right
|
right
|
Input
int
|
0
|
Specifies whether or not to show a right Y axis. This variable is editable only when the type variable is set to User_Defined.
|
Link To
|
linkto
|
Input
int
|
None
|
Specifies the index of the parent layer, to which the new layer is linked. This variable is editable only when the type variable is set to User_Defined.
|
X Axis
|
xaxis
|
Input
int
|
None
|
Specifies how to link the X axis of the new layer to the X axis of the parent layer. This variable is editable only when the type variable is set to User_Defined.
Option list
- none:None
- Removes the link between the X axes scales.
- straight:Straight(1 to 1)
- Creates a link in which the new layer axes mirror the scale values of the parent layer.
- custom:Custom
- Create a mathematical relationship between the axes' scales.
|
X1
|
x1
|
Input
string
|
|
This variable establish the From value for the axes of the added layer. Type the desired mathematical relationship to set the initial scale value for the child layer in terms of the parent layer scale value. When userdef:=1 xaxis:=custom, this variable is available.
For example, to set X axis initial scale value in the child layer to exactly twice the X axis scale value of the parent layer, set x1 = x1*2.
|
X2
|
x2
|
Input
string
|
|
This variable establish the To value for the axes of the added layer. Type the desired mathematical relationship to set the final scale value for the child layer in terms of the parent layer scale value. When userdef:=1 xaxis:=custom, this variable is available.
For example, to set X axis final scale value in the child layer to exactly twice the X axis scale value of the parent layer, set x2 = x2*2.
|
Y Axis
|
yaxis
|
Input
int
|
None
|
Specifies how to link the Y axis of the new layer to the Y axis of the parent layer. This variable is editable only when the type variable is set to User_Defined.
Option list
- none:None
- Removes the link between the Y axes scales.
- straight:Straight(1 to 1)
- Creates a link in which the new layer axes mirror the scale values of the parent layer.
- custom:Custom
- Create a mathematical relationship between the axes' scales.
|
Y1
|
y1
|
Input
string
|
|
This variable establish the From value for the axes of the added layer. Type the desired mathematical relationship to set the initial scale value for the child layer in terms of the parent layer scale value. When userdef:=1 yaxis:=custom, this variable is available.
For example, to set Y axis initial scale value in the child layer to exactly twice the Y axis scale value of the parent layer, set y1 = y1*2
|
Y2
|
y2
|
Input
string
|
|
This variable establish the To value for the axes of the added layer. Type the desired mathematical relationship to set the final scale value for the child layer in terms of the parent layer scale value. When userdef:=1 yaxis:=custom, this variable is available.
For example, to set Y axis final scale value in the child layer to exactly twice the Y axis scale value of the parent layer, set y2 = y2*2.
|
Auto Offset Overlapped Axes
|
offset
|
Input
int
|
0
|
Specify whether to set an offset to the axes of new added layer so that axes are not overlapped and users can select the layers conveniently. The default set is 0.
|
Activate New Layer
|
activate
|
Input
int
|
1
|
Specify whether to activate the new added layer.
|
Description
This X-Function can be used to add a new layer to the active graph. You can specify which axes will be displayed and whether to link the new layer to the active layer. When the new layer is linked to a parent layer, you can also specify how the axes scales are linked. Please note, except the first layer type "Bottom-X Left-Y", selecting other layer type will add a layer with Unit been set to % of Linked Layer.
Examples
1. To add a right Y axis to the graph and link this new layer to the active layer, select Insert: New Layer(Axes): Right Y(Linked X Scale and Dimension) .
2. To add a layer linked to active layer with a top X and a right Y axes, and customized Axis scale, select Insert: New Layer(Axes): Open Dialog...and then change the settings in the dialog as the screenshot below (suppose the active graph is Graph1):
3. Click OK to close the dialog.
Related X-Functions
laylink
|