OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis     
 
Skip Navigation Links
All BooksExpand All Books
X-FunctionExpand X-Function
X-Function ReferenceExpand X-Function Reference
Graph ManipulationExpand Graph Manipulation

2.5.13 layadd

Menu Information

Graph: New Layer(Axes)

Brief Information

Create a new layer on the active graph

Command Line Usage

1. layadd type:=topX;

2. layadd igp:=graph2 userdef:=1 bottom:=1 top:=1 linkto:=1 yaxis:=straight;

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 : (Normal) Bottom X + Left Y
    The new layer will have a bottom X axis and a left Y axis.
  • TopX: (Linked) Top X
    The new layer will have a top X axis that is linked to the active layer.
  • RightY: (Linked) Right Y
    The new layer will have a right Y axis that is linked to the active layer.
  • Txry: (Linked) Top X + Right Y
    The new layer will have a top X axis and a right Y axis that are linked to the active layer.
  • Inset: (Linked) Inset
    The new layer will be a linked inset for the active layer.
  • Insetdata: (Linked) Inset with Data
    The new layer will be a linked inset for the active layer, and it will have the data plots from the active 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.


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.


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.

Examples

1. To add a right Y axis to the graph and link this new layer to the active layer, select Graph: New Layer(Axes): (Linked) Right Y.

2. To add a linked left Y and a linked right Y axes, select Graph: New Layer(Axes): Open Dialog...and then change the settings in the dialog as the screenshot below (suppose the active graph is Graph1):
Layadd help English files image002.jpg

3. Click OK to close the dialog.

Related X-Functions

laylink

 

© OriginLab Corporation. All rights reserved.