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

plotbylabel

Contents

Menu Information

Multiple Panels by Label

Brief Information

Plot a multiple-layers graph by grouping on column labels

Additional Information

Minimum Origin Version Required: 8.1 SR0, updated in 8.5.1 SR0

Command Line Usage

plotbylabel iy:=[book1]1!((1,2),(1,3),(1,4)) group:=U plottype:=2 rows:=3 cols:=1;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input iy

Input

XYRange

<active>
Specify the input data ranges.
Group Identifier group

Input

string

<unassigned>
Specify the group identifiers for plotting the input data ranges. All available column label rows are listed here. Data with the same group identifier will be plotted into the same layer. When scripting, please refer to Column Label Row Characters for the single character to specify a label row.
Plot Type plottype

Input

int

0
Specify a plot type.

Option list:

  • line:Line
    Line plot.
  • scatter:Scatter
    Scatter plot.
  • linesymb:Line+symbol
    Line and Symbol plot.
  • column:Column
    Column plot.
Number of Rows rows

Input

int

<auto>
The layers will be arranged in N by M grid. This variable specifies M, the number of rows in the grid.
Number of Columns cols

Input

int

<auto>
The layers will be arranged in N by M grid. This variable specifies N, the number of columns in the grid.

Description

This X-Function plots multiple XY ranges into different layers according to group identifiers. The group identifiers can be specified by Long Name, Units, Comments or any other customized headers.

Examples

This example is going to plot the unstacked data ranges. First of all, we need to generate the unstacked data by using the wunstackcol X-Function.

  1. Import the data <Origin Installation Directory>\Samples\Statistics\nitrogen.txt.
  2. Highlight column B, and then select menu Worksheet: Unstack Columns.
  3. In the pop-up dialog, select column A for Group Columns, and the Put Grouping Info. to will use the User Defined Parameters, and set From Group Columns to Long Name.
    Image:Plotbylabel_example_4.png
  4. Click OK to generate the data.
    Image:Plotbylabel_example_1.png
  5. Highlight all of the columns in the UnstackCols1 worksheet and then select Origin main menu Plot: Multi-Curve: Multiple Panels by Label... to bring up the plotbylabel dialog.
  6. In the dialog, set Group Identifier as plant and Plot Type as Line+symbol. And keep the Number of Rows and the Number of Columns as default (Auto).
    Image:Plotbylabel_example_2.png
  7. Click the OK button to plot a graph with four layers, which identified by the group identifiers -- plant.
    Image:Plotbylabel_example_3.png

Related X-Functions

plotgroup, plotmyaxes