2.10.14 X-Function: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
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
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.
Adj. R-Square AdjRSq

Input

int

1
Specify whether to show the R-Square value (for Linear Fit). Default is checked.
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 deactivated when None is selected for diagonal.
Histogram histogram

Input

string

sparkline_box
Specify the Template for Histogram plot. This option would be deactivated when None is selected for diagonal.
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