Graph: Merge Graph Windows
Merge selected graph windows into one graph
1. merge_graph option:=open;
2. merge_graph row:=2 col:=3 newlayer:=1 keep:=0;
3. merge_graph option:=project topm:=7 bottommg:=15;
4. merge_graph option:=specified graphs:="graph1"+char(10)$+"graph2";
5. merge_graph option:=project row:=3 col:=1 resizewidthbyscale:=1 width:=11.41 height:=7.973 unit:=inch;
6. merge_graph option:=folder row:=2 col:=1 aspectratio:=1 width:=11.41 height:=7.973 unit:=inch labeltext:=custom labelcustom:=(a$) labelposition:=tro;
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 | |
---|---|---|---|---|---|
Merge | option |
Input int |
|
Specifies the option for selecting the graphs.
Option list:
| |
Graphs | graphs |
Input string |
|
Specifies the graphs to be merged. This variable is available only when "specified" is selected for the option variable. Note that any two adjacent graph names should be separated by a "/n" character. In the dialog, you can enter each graph name in a separate row. | |
Keep Source Graphs | keep |
Input int |
|
Specifies whether or not to keep the source graphs after the merging is performed. | |
Rearrange Layout | arrange |
Input int |
|
Specifies whether to rearrange the layers that belong to graphs that include multiple layers. | |
Number of Rows | row |
Input int |
|
Specifies the number of rows in the new graph. The graphs will be arranged on a row by col grid in the new window. | |
Number of Columns | col |
Input int |
|
Specifies the number of columns in the new graph. The graphs will be arranged on a row by col grid in the new window. | |
Direction | dir |
Input int |
|
Specifies the direction for arranging graph layers. Option list:
| |
Use Alternate Side to Show Ticks and Labels | alternate |
Input int |
|
Specifies whether to show Axis Ticks and Labels on left and right side (bottom and top) alternately in the graph layers. Option list:
| |
Add Extra Layer(s) for Grid | newlayer |
Input int |
|
Specifies whether to add new layers for empty grids, when the number source graphs is less than the product of the values of the row variable and the col variable. | |
Keep Layer Aspect Ratio | aspectratio |
Input int |
|
Specifies whether to keep the original aspect ratio of the graph layers. | |
Treat Each Source Graph as a Unit | groupgraph |
Input int |
|
When this variable is set to 1, all layers from the same source graph are treated as a unit when merging graphs. Unlinked layers in the source graph will be linked to the original Layer1. Set this variable to 0 in order to disable such behavior. | |
Link Source Graphs | linkarrange |
Input int |
|
Specify whether to link all unlinked layers to Layer1 in the merged graph. Linked layers remain linked to the layer they were linked to before merging. | |
Set Layer Width by Common Scale | resizewidthbyscale |
Input int |
|
The width of each layer is determined using a common scale. For instance, when drawing stacked bar charts, establishing a common scale allows direct visual comparison of bar length across layers. By contrast, when this option is not enabled, two axes with the same physical dimensions may display very different scale ranges. | |
Set Layer Height by Common Scale | resizeheightbyscale |
Input int |
|
The height of each layer is determined using a common scale. For instance, when drawing stacked column charts, establishing a common scale allows direct visual comparison of column height across layers. By contrast, when this option is not enabled, two axes with the same physical dimensions may display very different scale ranges. | |
Show Axes Frame | smartarrange |
Input int |
|
Specify whether to show axes frame and hide axes/ticks of graphs when axes/ticks are overlapping. | |
Unit | spaceunit |
Input int |
|
Specifies the unit of gaps and margins in the new graph page.
Option list:
| |
Horizontal Gap | xgap |
Input int |
|
Specifies the horizontal gap between adjacent layers. | |
Vertical Gap | ygap |
Input int |
|
Specifies the vertical gap between adjacent layers. | |
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 for the new graph page.
Option list:
| |
Width | width |
Input double |
|
Specifies the width of the new graph page. | |
Height | height |
Input double |
|
Specifies the height of the new graph page. | |
Unit | unit |
Input int |
|
Specifies the unit for the new graph page.
Option list:
| |
Scale Mode | scalemode |
Input int |
|
Specifies how the axes, axes labels, legend, data plots, and other objects that are attached to the Layer Frame or Layer and Scales are affected when a layer in the new graph page is resized.
Option list:
| |
Fixed Factor | fixfactor |
Input double |
|
This variable is available only when the scalemode variable is set to "Fixed Factor". It specifies the fixed scale factor. | |
Label Text | labeltext |
Input int |
|
Determine what kind of labels should be added to each graph in the merged one.
Option list:
| |
Custom | labelcustom |
Input string |
|
Only available when the labeltext is set as custom. Specify the custom label texts. Substitution notation and enumeration code are supported.
For enumeration code, %(u$) and %(v$) enumerate uppercase and lowercase letters. $(i) and # enumerate index. %(p$) represents character #. More details about this custom drop-down list, please refer to the Origin Help page. | |
Label Position | labelposition |
Input int |
|
Specify the position of graph labels in each graph layer.
Option list:
| |
Output Graph | ogp |
Output GraphPage |
|
Specify output the merged graph to a specified graph window. |
This X-Function merges the specified graphs into a new graph window. In the new graph, the source graphs are arranged in a row by col grid.
In the following example, we merge two graphs (Graph1 and Graph2) into a new graph page:
g2layout, layadd, laysetunit, laylink
Keywords:combine