OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis     
 
Skip Navigation Links
All BooksExpand All Books
TutorialsExpand Tutorials
Data AnalysisExpand Data Analysis
GadgetsExpand Gadgets

4.1.6 Cluster Gadget

Summary

Origin supports the Cluster Gadget to perform simple statistics on a region of interest (ROI) in a graph. The gadget can also be used to edit, clear, mask, or categorize data points. The statistics results are dynamically updated as the ROI object is moved or resized.

Minimum Origin Version Required: Origin 2016 SR0 (Pro only)

What you will learn

  • How to perform simple statistics on a region of interest (ROI) in a graph.
  • How to edit the data points such as clear, or mask points in graph using menu options or buttons.
  • How to view or output the statistic for points inside and outside of the ROI.
  • How to categorize data points and color map points with the categorical data

Perform basic statistics

  1. Start with a new workbook and import the Origin sample data Categorical Data.dat which is located in <Origin Program Folder> \Samples\Graphing.
    Right-click on Col(D) and select Sort Worksheet: Ascending. Then you will see the worksheet is sorted by the category of Drug.
  2. Pressing Ctrl key, highlight three parts of the Col(B) separately.
    Cluster Gadget 01.png
  3. Select Plot: Symbol: Scatter from the main menu to create a graph. The graph with three plots display the recovery for each drug.
    Cluster Gadget 02.png
  4. Right-click on the graph legend and select Properties to open Object Properties dialog. Then edit the legend as shown below. Click OK button.
    Cluster Gadget 10.png
  5. Select Gadgets: Cluster from the Origin menu to bring up the Cluster: addtool_cluster dialog box. Choose Circle in the Shape drop-down list of the ROI Box tab.
    Cluster Gadget 03.png
  6. Click OK button. It will add a yellow circle for ROI on the plot and bring up the Cluster Gadget dialog.
    Cluster Gadget 04.png
  7. Move the yellow circle to the region for which you want to get statistics and see the results shown on the Inner Points tab of the dialog.
    Cluster Gadget 05.png
  8. Click the Output Statistics Report buttonButton Output Statistics Report.png. The results are output to the Result Log, Script Window, and the Cluster workbook.
  9. Click the Go to Report Worksheet buttonButton Go To Report Worksheet.png, then the Cluster workbook will be shown.
    Cluster Gadget 11.png

Exclude the data points in a cluster

In this section, we will show you how to exclude a specific plot from the cluster. Based on the example above, we will do simple statistics on Recovery of Drug A and Recovery of Drug B, excluding Recovery of Placebo.

  1. Click the Data menu in the Cluster Gadget dialog and uncheck Plot(1) and Plot(2). The first and second rows become gray in the lower panel, and they can no longer be manipulated by the buttons in the dialog.
  2. Click Mask Data Points buttonButton Mask Data Points.png. The Recovery of Placebo data points in the ROI are masked and the color becomes red. At the same time the statistics results for Recovery of Placebo become missing values.

    Cluster Gadget 07.png

  3. Click the Output Statistics Report buttonButton Output Statistics Report.png. The results are output to the Result Log, Script Window, and the Cluster workbook.

Get statistics results for points outside of the ROI

  1. Click Settings: Preferences from the Cluster Gadget dialog's menu to open the Cluster Manipulation Preferences dialog.
  2. Go to the Calculation tab. Click the Calculate Outer Points check box.
    Cluster Gadget 08.png
  3. Click the OK button, the statistics results for points out of the ROI are shown on the Outer Points tab of the dialog.
    Cluster Gadget 09.png
  4. Click the Output Statistics Report buttonButton Output Statistics Report.png. The results for inner and outer points are shown in the Result Log, Script Window, and the Cluster workbook.

Color data points in different regions

You can categorize data points from graph directly and output the Categorical group column to the source worksheet, and further map symbol characters to the categorical group column.

Create a new workbook and re-import the sample data <Origin Program Folder>\Samples\Graphing\Categorical Data.dat. Highlight Column(B) and plot a Scatter graph.

Cluster Gadget 12.png

Data points cluster into 4 groups. We will use the Create Categories feature of Cluster Gadget to create a categorical column according to the cluster groups and map symbol color to this column.

  1. Select Gadgets: Cluster to bring up the Cluster: addtool_cluster dialog. Choose Circle in the Shape drop-down list of the ROI Box tab.
    Click OK button to add a yellow circle for ROI on the plot and bring up the Cluster Gadget dialog.
  2. Move and adjust the size of the ROI box to circle only the first cluster of data points at the low-left corner.
    Cluster Gadget 13.png
    Click the Create Categories button Button Create Categories.png on the Cluster Gadget dialog to open the Create Categorical Value dialog. Enter Group for Category Group Name and 1 for Category.
    Cluster Gadget 14.png
    Click the OK button. A new categorical column named "Group" is added to the source data sheet and data points inside ROI are tagged as "1" in this column(Group).
    Cluster Gadget 15.png
  3. Repeat step 2 for the rest of 3 clusters and tag them as 2, 3, 4 in sequence.
    Cluster Gadget 16.png
    The source worksheet should look like the following.
    Cluster Gadget 17.png
    Close Claster Gadget.
  4. Now we will color-map data points to column(Group). Double click on the scatter to open the Plot Details dialog. Go to Symbol tab. Select By Points tab from Symbol Color drop-down list. Then select Col(E): "Group" under the Indexing drop-down list.
    Cluster Gadget 18.png
    Click OK.
    Cluster Gadget 19.png
  5. Delete the original legend. Select Graph: Legend: Categorical Values to bring up the legendcat dialog. Select checkboxes Symbol(Edge) Color. Click OK. The scatter plot with new legend should look like following.
    Cluster Gadget 20.png
 

© OriginLab Corporation. All rights reserved.