OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

pickpts

Contents

Brief Information

Pick XY data points from a 2D graph

Additional Information

Minimum Origin Version Required: 8.1 SR3

Command Line Usage

  1. pickpts npts:=3;
  2. pickpts gp:=[Graph2] npts:=5 plot:=<new>;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Graph gp

Input

GraphPage

<active>
Specifies the graph to pick points from
Number of Points to Get npts

Input

int

10
Specifies the number of points to pick from the input graph
Reader Type type

Input

int

0
Specifies the type for picking points

Option list:

  • data:Data Reader
    Picks points in Data Reader mode. It only picks up data points existed in the source worksheet.
  • screen:Screen Reader
    Picks points in Screen Reader mode. It allows you to pick up points located anywhere on the graph and reads their XY coordinates from graph.
X Coordinates x

Output

vector

<new>
Specifies the output range for picked points? X coordinates.
Y Coordinates y

Output

vector

<new>
Specifies the output range for picked points? Y coordinates
Plot Name plot

Output

vector<string>

<optional>
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

<optional>
Specifies the output range for data points? indices. It is accessible only when Data Reader is selected for Reader Type.

Description

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.

Examples

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:

Image:pickpts_01.gif

After the selection is done, the results output to a new worksheet automatically:

Image:pickpts_02.gif