
Contents |
Pick XY data points from a 2D graph
Minimum Origin Version Required: 8.1 SR3
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input Graph | gp |
Input GraphPage | | Specifies the graph to pick points from |
| Number of Points to Get | npts |
Input int | | Specifies the number of points to pick from the input graph |
| Reader Type | type |
Input int | | Specifies the type for picking points
Option list:
|
| X Coordinates | x |
Output vector | | Specifies the output range for picked points? X coordinates. |
| Y Coordinates | y |
Output vector | | Specifies the output range for picked points? Y coordinates |
| Plot Name | plot |
Output vector<string> | | Specifies the output range for plot name(s) of the picked data points. It is accessible only when Data Reader is selected for Reader Type. |
| Point Index | index |
Output vector | | Specifies the output range for data points? indices. It is accessible only when Data Reader is selected for Reader Type. |
This X-Function allows you to pick XY data points from graph by using Data Reader type or Screen Reader type and gets their coordinates related information.
The following scripts show you how to pick data points from multiple layers.
// create a new worksheet window based on ORIGIN.OTW win -t; // fill the worksheet with row numbers in the first two columns col(A) = data(1,10); col(B) = data(1,10); // fill the third and forth columns with normal random numbers col(C) = Normal(10); col(D) = Normal(10); // highlight second to forth columns worksheet -s 2 0 4 0; // plot a 3Ys_Y-Y-Y graph from the selected three columns run.section(Plot,3Ys_Y-Y-Y); // pick up 5 points from graph, and output their XY coordinates, plot names and indices pickpts npts:=5 plot:=<new> index:=<new>;
With the graph active, double click on the interesting data points to select them:
After the selection is done, the results output to a new worksheet automatically: