OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

merge_graph

Contents

Menu Information

Merge Graph Windows

Brief Information

Merge selected graph windows into one graph

Command Line Usage

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";

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Merge option

Input

int

<auto>
Specifies the option for selecting the graphs.

Option list:

  • page:Active Page
All graphs in the active page.
  • folder:All in Active Folder
All graphs in the active folder, excluding those in the subfolders.
  • recursive:All in Active Folder (Recursive)
All graphs in the active folder, including those in the subfolders.
  • open:All in Active Folder (Open)
All open graphs in the active folder.
  • embed:All in Active Folder (Include Embedded)
All graphs in the active folder, including the embedded graphs.
  • project:All in Project
All graphs in the current project.
  • specified:Specified
Graphs specified by the graphs variable.
Graphs graphs

Input

string

<auto>
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

1
Specifies whether or not to keep the source graphs after the merging is performed.
Rearrange Layout arrange

Input

int

1
Specifies whether to rearrange the layers that belong to graphs that include multiple layers.
Number of Rows row

Input

int

<auto>
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

<auto>
Specifies the number of columns in the new graph. The graphs will be arranged on a row by col grid in the new window.
Add Extra Layer(s) for Grid newlayer

Input

int

0
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

0
Specifies whether to keep the original aspect ratio of the graph layers.
Link Layers linkarrange

Input

int

1
Specifies whether to link the layers that you want to merge. The default is yes.
Show Axes Frame smartarrange

Input

int

0
Specifies whether to show axes frame and hide the overlapping axes/ticks of the merged layers. The default is no.
Horizontal Gap xgap

Input

int

5
Specifies the horizontal gap between adjacent layers.
Vertical Gap ygap

Input

int

5
Specifies the vertical gap between adjacent layers.
Left Margin leftmg

Input

int

15
Specifies the left margin to the new graph page.
Right Margin rightmg

Input

int

10
Specifies the right margin to the new graph page.
Top Margin topmg

Input

int

10
Specifies the top margin to the new graph page.
Bottom Margin bottommg

Input

int

15
Specifies the bottom margin to the new graph page.
Orientation portrait

Input

int

0
Specifies the orientation for the new graph page.

Option list:

  • landscape:Landscape
Landscape.
  • portrait:Portrait
Portrait.
Width width

Input

double

<auto>
Specifies the width of the new graph page.
Height height

Input

double

<auto>
Specifies the height of the new graph page.
Unit unit

Input

int

<auto>
Specifies the unit for the new graph page.

Option list:

  • inch:inch
inch.
  • cm:cm
cm.
  • mm:mm
mm.
  • pixel:pixel
pixel.
  • point:point
point.
Scale Mode scalemode

Input

int

0
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:

  • source:Auto
Uses the settings in the source graphs.
  • frame:Scale with Layer Frame
Scales the layer elements proportionally with the layer.
  • fixed:Fixed Factor
Determines the size of the layer elements relative to their original size (font size, symbol size, and line width, etc.).? The size of these elements is determined by multiplying their original size by the scale factor specified by the fixfactor variable?
Fixed Factor fixfactor

Input

double

1
This variable is available only when the scalemode variable is set to "Fixed Factor". It specifies the fixed scale factor.

Description

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.

Examples

In the following example, we merge two graphs (Graph1 and Graph2) into a new graph page:

  1. From the Origin menu, select Graph: Merge Graph Windows. This opens the dialog of the merge_graph X-Function.
  2. In the dialog, select Specified with the Merge drop-down list. Click the Browse Image:merge_graph_help_English_files_image002.jpg button to the right of the Graphs edit box to open the Graph Browser dialog. Select Graph1 and Graph2 and click OK to close the Graph Browser dialog.
  3. Click the OK button in the merge_graph X-Function dialog to close the dialog of the X-Function and perform the merging.

Related X-Functions

layadd, laysetunit, laylink