2.10.14 plot_matrix


Menu Information

Plot: 2D: Scatter Matrix

Brief Information

Create scatter matrix plot including option for grouping

Additional Information

Minimum Origin Version Required: 8.0 SR0

Command Line Usage

1. plot_matrix -r 1 irng:=[Book1]Sheet1!(C,E:G) mdisp:=lower diagonal:=hist gap:=1;

2. plot_matrix -r 1 irng:=[Fisher'sIrisD]"Fisher's Iris Data"!A"Sepal Length":D"Petal Width" group:=[Fisher'sIrisD]"Fisher's Iris Data"!E"Species" mdisp:=upper diagonal:=hist;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

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

Input

Range

<active>
The input data range. At least two columns (or part of the two columns) are specified.
Grouping Range group

Input

Range

<optional>
Specify the grouping range.
Matrix Display mdisp

Input

int

0
The matrix format can be one of three arrangements. Option List:
  • 0:Square
  • 1:Upper Triangular
  • 2:Lower Triangualr
  • 3=mixed:Mixed
When select this option, Additional Statistics Info in will be available. The matrix display is controlled by the position of these additional statistics info (tristats).
Additional Statistics Info in tristats

Input

int

0
Specify the position of the additional statistics info. Option List:
  • 0=lower: Lower Triangular
The additional statistics info shows in lower triangular, the Scatter plots will show in the upper triangular.
  • 1=upper:Upper Triangular
The additional statistics info shows in upper triangular, the Scatter plots will show in the lower triangular.
Show in Diagonal Cells diagonal

Input

int

0
Specify what kind of plot is shown in the diagonal cells.

Option List:

  • 0:<None>
Box Chart or Histogram will not be displayed in the diagonal cells
  • 1:Box Chart
Display the Box charts in the diagonal cells
  • 2:Histogram
Display the Histogram plots in the diagonal cells
  • 3=histdist:Histogram with Distribution Curve
Display the Histogram plots with distribution curve in the diagonal cells.
  • 4=dist:Distribution Curve
Display the distribution curve in the diagonal cells.
  • 5=distfill:Distribution Curve with Fill
Display the distribution curve filling to bottom in the diagonal cells.
Variables in Diagonal Cells var

Input

int

1
Specify whether to display the long name of columns from source data. Default is checked.
Show Tick and Label tick

Input

int

1
Specify the way of tick and labels arrangement. Option List:
  • 0:None
  • 1:All
  • 2:Alternate
  • 3:Bottom&Left
  • 4:Bottom&Right
  • 5:Top&Left
  • 6:Top&Right
Gap(in % of Page Dimension) gap

Input

int

0
Specify the gap spacing between each layer in units of % of the width.
Confidence Ellipse ellipse

Input

int

0
Specify whether to show a confidence ellipse for each graph based on the chosen confidence level. Default is unchecked.
Confidence Level in % conflevel

Input

double

95
This is only available when conflevel = 1. Specify the confidence level in % for the confidence ellipses. This value must be greater than 0 and less than 100.
Linear Fit fit

Input

int

0
Specify whether to perform a linear fit to each pair of variables. Default is unchecked. When checked, the fitted line and the adjusted R^2 value will be added to each scatter graph. If opted for (fit:=1), a sheet named as ScatterMatrixStatsN will be added to the active workbook and adjusted R-values outputted to that sheet.
Pearson's r correlation

Input

int

0
Specify whether to show Pearson's r (correlation coefficient) value. Default is unchecked. If opted for (correlation:=1), a sheet named as ScatterMatrixStatsN will be added to the active workbook and coefficients outputted to that sheet. Option List:
  • 0=false
  • 1=true
Custom Pearson's r Label corrLabel

Input

string

Pearson's r=$(v, *)
Custom the label of Pearson's r info, when Pearson's r option is shown (correlation:=1).
Adj. R-Square AdjRSq

Input

int

1
Specify whether to show the R-Square value (for Linear Fit). Default is checked. Option List:
  • 0=false
  • 1=true
Custom Adj. R-Square Label AdjRSqLabel

Input

string

Adj R^2=$(v, *)
Custom the label of Adj. R-Square info, when Adj. R-Square option is shown (AdjRSq=1).
Significant Mark sigmark

Input

int

0
Specify whether show the significant mark for additional statistics info. Option List:
  • 0=false
  • 1=true
Significant Level siglevel

Input

string

0.05 0.01 0.001
It's default value are 0.05 0.01 0.001. It means there is 3 levels, if correlation coefficient<0.001, significant mark is ***, 0.001<correlation coefficient<0.01, significant mark is **, and so on, when value >0.05, mark is empty
Label Size by Value bubble

Input

int

0
This option is available when
  • Not set Grouping Range for the input dataset.
  • Pearson's r and Adj. R-Square option, one of them is shown, but not shown both.

In such case, it will vary the size of label according to value.

Exclude Missing Value Listwise missing

Input

int

0
Specify whether to exclude missing values (listwise). That is, exclude the entire row for all datasets if there are any missing values in this row. Default is unchecked.
Scatter scatter

Input

string

ScatterMatrix
Specify the Template for Scatter plot.
Box box

Input

string

BoxMatrix
Specify the Template for Box charts. This option would be available when Box Chart is selected for Show in Diagonal Cells (diagonal:=1).
Histogram histogram

Input

string

sparkline_box
Specify the Template for Histogram plot. This option would be available when Histogram or Histogram with Distribution Curve is selected for Show in Diagonal Cells (diagonal:=2 or diagonal:=3).
Distribution Curve dist

Input

string

DistMatrix
Specify the Template for Distribution Curve. This option would be available when Distribution Curve or Distribution Curve with Fill is selected for Show in Diagonal Cells (diagonal:=4 or diagonal:=5).
Output Results rd

Output

ReportData

[<input>]<new>
Specify where the data of the scatter matrix is stored.

Description

For detailed information about this X-Function, please refer to our User Guide Scatter Matrix Plot

Note: in Origin 2017 or ealier versions, this X-Function is not accessible from LabTalk script. To plot scatter matrix from script, you will need to use

worksheet -px

For example,

worksheet -px ? boxmatrix plot_matrix -r 1 irng:=col(A):col(D) group:=col(E) mdisp:=upper diagonal:=hist;

Keywords:confidence, ellipse, linear fit