Plot: 2D: Scatter Matrix
Create scatter matrix plot including option for grouping
Minimum Origin Version Required: 8.0 SR0
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;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input | irng |
Input Range |
|
The input data range. At least two columns (or part of the two columns) are specified. |
Grouping Range | group |
Input Range |
|
Specify the grouping range. |
Matrix Display | mdisp |
Input int |
|
The matrix format can be one of three arrangements. Option List:
|
Additional Statistics Info in | tristats |
Input int |
|
Specify the position of the additional statistics info. Option List:
|
Show in Diagonal Cells | diagonal |
Input int |
|
Specify what kind of plot is shown in the diagonal cells.
Option List:
|
Variables in Diagonal Cells | var |
Input int |
|
Specify whether to display the long name of columns from source data. Default is checked. |
Show Tick and Label | tick |
Input int |
|
Specify the way of tick and labels arrangement. Option List:
|
Gap(in % of Page Dimension) | gap |
Input int |
|
Specify the gap spacing between each layer in units of % of the width. |
Confidence Ellipse | ellipse |
Input int |
|
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 |
|
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 |
|
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 |
|
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:
|
Custom Pearson's r Label | corrLabel |
Input string |
|
Custom the label of Pearson's r info, when Pearson's r option is shown (correlation:=1). |
Adj. R-Square | AdjRSq |
Input int |
|
Specify whether to show the R-Square value (for Linear Fit). Default is checked. Option List:
|
Custom Adj. R-Square Label | AdjRSqLabel |
Input string |
|
Custom the label of Adj. R-Square info, when Adj. R-Square option is shown (AdjRSq=1). |
Significant Mark | sigmark |
Input int |
|
Specify whether show the significant mark for additional statistics info. Option List:
|
Significant Level | siglevel |
Input string |
|
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 |
|
This option is available when
In such case, it will vary the size of label according to value. |
Exclude Missing Value Listwise | missing |
Input int |
|
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 |
|
Specify the Template for Scatter plot. |
Box | box |
Input string |
|
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 |
|
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 |
|
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 |
|
Specify where the data of the scatter matrix is stored. |
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