6.10.14 Scatter Matrix
A scatter matrix consists of several pair-wise scatter plots of variables presented in a matrix format. It can be used to determine whether the variables are correlated and whether the correlation is positive or negative. This tutorial will show you how to create a Scatter Matrix plot.
Minimum Origin Version Required: Origin 2016 SR0
What you will learn
- How to create a Scatter Matrix plot with a histogram
- How to customize Scatter Matrix plot
- How to set a grouping range for showing the color index
- How to specify to hide scatter plots on the bottom/top of the diagonal
Creating Scatter Matrix plot
- Start with an empty worksheet, select File: Import: Single ASCII... to open the Import Single ASCII dialog, browse to the \Samples\Statistics subfolder of the Origin program folder, and import the file Fisher's Iris Data.dat.
- Highlight columns (A) to (D) but not col(E), and select Plot: Statistics: Scatter Matrix from the main menu.
- In the dialog, select Histogram from the Show in Diagonal Cells drop-down list, and select Alternate from Show Tick and Label drop-down list.
- Click OK to close the dialog. The PlotData1 sheet for the scatter matrix plot is generated in the same workbook as the original data. It contains the data for the different graphs in the scatter matrix and can be accessed by clicking on the second tab labelled PlotData1 at the bottom of the workbook. The graph should appear as below:
Customizing Scatter Matrix plot
There are multiple layers in the Scatter Matrix graph. This section will explain how to customize the background color, the type and color of the data plots and the axis tick labels of the scatter matrix. Starting with Origin 2016, by default, if you change the plot style or axis setting of one layer, all other layers will follow (for independent editing, see the tip at the end of this section).
- Double click on the scatter data to open the Plot Details dialog. To change the symbol color click on the Symbol Color drop-down menu and select a color from the Individual Color option. Specify the type and color of the symbol as shown in the following image, and click OK.
This change will be applied to all scatter data plots in this graph.
- To change the background color of the entire window, select Format: Page Properties to open the Plot Details dialog. This dialog can also be accessed by double clicking inside the Scatter Matrix window. In the Display tab, click on the Define Custom Colors button in the Color option.
- In the Color dialog, specify the color as Red=235, Green=235, Blue=255 in the lower left corner of the box. Add as a custom color and click OK.
- To specify the background color of the layers with scatter plots without changing the background color of the histograms or the rest of the graph,
double click on the one layer of the scatter plot to open the dialog. Go to Background tab, and set Color to White.
Then click OK in the dialog. This change will be applied to all layers with scatter data plots.
- Double click on any tick label in the graph to open the Axis dialog for that layer. Go to the Tick Labels tab, then the Format tab, specify Size to 36 for the Top axis. Click Apply.
- Click the Apply To... button to open the Apply To dialog, set the following to apply the previous customization of tick label size to all the other axes in this window.
- The graph will appear as shown below:
If you want to customize each layer independently, select the Independent Layer Control check box on the Miscellaneous tab (Page level) of the Plot Details dialog box.
Add Grouping Range
- To add a Grouping Range, click on the green lock icon on the upper-left corner. Select Change Parameters to bring up the Plotting: plot_matrix dialog.
- Click the triangular button next to the Grouping Range option. Click on the Select Columns to open the Column Browser dialog, and choose column E (Species) as the group range. Use Add to add it to the panel below and click OK.
- Click the OK button in the Plotting: plot_matrix dialog. The graph will appear as shown below:
Customizing Matrix Display
- To hide the layers on the bottom of the diagonal in Scatter Matrix graph, click on the green lock icon on the upper-left corner. Select Change Parameters to bring up the Plotting: plot_matrix dialog.
- Under Matrix Profile branch of the dialog,
- Select Upper Triangular from the Matrix Display drop-down list
- Select All from Show Tick and Label drop-down list
- Enter 2 in the Gap (in % of Page Dimension) text box
The complete graph should appear as shown below: