Limit

Find limiting values for dataset (number of points, min Y, index of min Y, etc.).

This command is no longer recommended. Please see the stats X-Function.

Syntax:

limit  [option] dataset [range]

Options:

no option; Find limiting values for dataset

Syntax: limit no option

Find limiting values for dataset (number of points, min Y, index of min Y, etc.). The dataset argument should be a Y dataset (although any dataset is OK). Origin will find the X data associated with this dataset (using index numbers if none is found) and find the following values:

limit.size -- Total size (number of points) for dataset.
limit.ymin -- Minimum Y value.
limit.imin -- Corresponding index for minimum Y value.
limit.ymax -- Maximum Y value.
limit.imax -- Corresponding index for maximum Y value.
limit.xmin -- Minimum X value.
limit.xmax -- Maximum X value.

Each value is placed into limit object properties. Use the limit command before checking the property values. The limit object properties are set and read in the same way as numeric variables. For example:

limit.xmax= ; //returns: limit.xmax = 120;

Note: If you execute the limit command while a graph with Speed Mode ON is active (on the Size/Speed tab of the layer's Plot Details dialog box), then the results will only include the actual displayed values.

-r beg end num inc; calculate the appropriate inc value and adjust beg and end

Syntax: limit -r beg end num inc

From the provided beginning beg, end, and number of points num values, calculate the appropriate inc value and adjust beg and end.This is the same mechanism used in automatic increment calculation and rescaling.

Examples:

The following script finds the limits for data1_b from index number 10 to index number 30, inclusive. The properties contain information for this range only.

limit data1_b -b 10 -e 30;

The next script calculates a step value of 2 and sets start to -3 and stop to 16.

start = -2.786;
stop = 15.901;
ticks = 9;
step = 0;
limit -r start stop ticks step;

The last script returns the greatest value in the Data1_C dataset to the Script window.

limit Data1_C;
limit.ymax =;