Graph:Add Graphs to Layout...
Add selected graphs to new layout
Minimum Origin Version Required:9.1 SR0
1. g2layout option:=open;
2. g2layout row:=2 col:=2;
3. g2layout option:=project xgap:=0 ygap:=0;
4. g2layout option:=specified graphs:="graph1"+char(10)$+"graph2";
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 |
---|---|---|---|---|
Arrange | option |
Input int |
|
Specifies the graphs to be added in layout Option list:
|
Graphs | graphs |
Input string |
|
If the Arrange variable is set to Specified, user can use this text box to enter the names of the graphs to be added in layout. In this case, the browse button to the right of this text box becomes enabled and you can use it to browse for the graphs to be added. However, if other options are selected for the Arrange variable, this text box will be read-only. You can see the names of the graphs that will be added, but you cannot edit the content of this text box. |
Number of Rows | row |
Input int |
|
Specifies the number of rows in layout. The graphs will be arranged on a row by col grid when added into layout. |
Number of Columns | col |
Input int |
|
Specifies the number of columns in layout. The graphs will be arranged on a row by col grid when added into layout. |
Keep Graph Aspect Ratio | aspectratio |
Input int |
|
Specifies whether to keep the original aspect ratio of the graph windows. |
Horizontal Gap | xgap |
Input int |
|
Specifies the horizontal gap between adjacent windows. |
Vertical Gap | ygap |
Input int |
|
Specifies the vertical gap between adjacent windows. |
Left Margin | leftmg |
Input int |
|
Specifies the left margin to the new graph page. |
Right Margin | rightmg |
Input int |
|
Specifies the right margin to the new graph page. |
Top Margin | topmg |
Input int |
|
Specifies the top margin to the new graph page. |
Bottom Margin | bottommg |
Input int |
|
Specifies the bottom margin to the new graph page. |
Orientation | portrait |
Input int |
|
Specifies the orientation of the layout
Option list:
|
Width | width |
Input double |
|
Specifies the width of the layout |
Height | height |
Input double |
|
Specifies the height of the layout. |
Unit | unit |
Input int |
|
Specifies the unit of Width and Height.
Note: When the unit selection is changed in the drop-down list, Height and Width text box values are automatically updated so that the layout retains the same size and position. This is not the case when running from script where the values and units should be consistent. Here pixel refers to number of dots where most Origin graphs have 600 dots per inch. Option list:
|
This X-Function adds the specified graphs into layout. In layout, the source graphs are arranged in a row by col grid
In the following example, we add four 3D function plots into a layout.
This Example is associated with the 3D Function Plot: User-Defined 3D Parametric Function Plots folder in the 3D OpenGL Graph project (\Samples\3D OpenGL Graph.opj), which can be opened by selecting Open Sample OPJ: 3D OpenGL Graphs from the main menu
![]() | You can add equation of the 3D function plots to layout by selecting Insert Equation button, |