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

add_table_to_graph

Contents

Menu Information

New Table

Brief Information

Add a linked table to a graph or a layout

Command Line Usage

  1. add_table_to_graph cols:=3 row:=3;
  2. add_table_to_graph cols:=5 rows:=4 title:=mytable;
  3. add_table_to_graph igl:=[graph1]layer1 cols:=5 rows:=4 title:=mytable col:=1;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Layer igl

Input

Layer

<active>

Specifies the graph layer to which the table should be added.

Number of Columns cols

Input

int

5

Specifies the number of columns in the table.

Number of Rows rows

Input

int

8

Specifies the number of rows in the table.

Table Title title

Input

string

Specifies the title of the table.

Show Column Labels col

Input

int

0

Specifies whether to show the column label row.

Table Name tabname

Output

string

Specifies the string name used to store the name of the created table.

Description

This function adds a linked table to a graph or a layout. This is usually for displaying additional information on the graph/layout.

The table is editable. To edit it, you can double-click on the table. Then it is opened and you can edit it as in the Origin Worksheet. When the editing is done, you can click the Update Table button to update the changes to the graph/layout.

Examples

In this example, we add a 3x3 table to the active graph.

  1. When the graph is active, choose Graph: New Table from the Origin menu. This opens the dialog of the add_table_to_graph X-Function.
  2. In the dialog of the X-Function, change the settings to match the screenshot below, and click OK to close the dialog.
    Image:add_table_to_graph_help_English_files_image002.png
  3. A new table is added to the graph.

For more examples, please refer to the XF Script Dialog (press F11).

Related X-Functions

add_graph_to_graph