auto_xy_Peaks creates a new dataset with the local minima and maxima of the given dataset. See detect_peaks.

The new dataset will be updated, if the source dataset is modified, for example if a data exchange has been executed. If the source dataset has been removed the peak dataset will not be updated.

hDataNew = auto_xy_Peaks(hData, rsThreshold, nType, bAbs, bLabel);
hDataNew = auto_xy_Peaks(hData_Layer, rsThreshold, nType, bAbs, bLabel);

Return Value


hDataNew is the handle of the new dataset.




hData is the handle of a 2D dataset. The new dataset hDataNew will be added to the layer (diagram) in which the dataset hData is located.


hData_Layer is a vector with two elements. The first element is a handle of a 2D dataset and the second element is a handle of a layer (diagram) to which the new dataset should be added.


rsThreshold is the peak threshold. Only peaks are detected where the difference between adjacent extreme values are greater than the threshold.


Is one of the following values:

Value Description
1 Local Maxima
2 Local Minima
3 Local Minima und Maxima

Specifies if rsThreshold is given as an absolute value (bAbs = TRUE) or as a relative value in percent (bAbs = FALSE). If given as a relative value the data range of the given dataset is used to calculate the threshold value.


If bLabel is TRUE (1), the locale minima und maxima with be labeled (maximum 50 labels).