PURPOSE
This app can be used to classify points in a graph by given boundary points for each group.
INSTALLATION
Download the file Classify_Points_in_Graph.opx, and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps Gallery window.
NOTE: This tool requires OriginPro.
OPERATION
- Make the graph active. Click Classify Points in Graph app icon in Apps Gallery window.
- In the opened dialog, click the Right Triangle button on the right of Points in Graph to Classify branch, and select a plot from the context menu.
- If your first plot includes boundary data for each group, check Boundary Data in 1st Plot, otherwise uncheck it, and select boundary data from a worksheet. Boundary points for each group constructs a polygon. Two neighboring group points are separated by an empty row.
- Click OK button. A new column will be created in the worksheet for selected plot data to predict groups for points in the plot.
SAMPLE OPJU FILE
This app provides a sample OPJU file. Right click on the Classify Points in Graph icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file ClassifyPtsEx.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).
ALGORITHM
Given boundary points for each group can construct a polygon. We can determine whether a point is inside the polygon using an existing function.