.. highlightlang:: us .. index:: XYGetData .. _xygetdata: XYGetData ========= .. us.tag XYGetData ENGLISH xy.data Changed5200 :ref:`XYGetData` returns all data points or a clipping of data points. .. function:: rmXY = XYGetData(hData) rmXY = XYGetData(hData, bExt) rmXY = XYGetData(hData, nFirst) rmXY = XYGetData(hData, nFirst, nCount) rmXY = XYGetData(hData, nFirst, nCount, bExt) .. us.return **Return Value** *rmXY* is the 2 columned matrix of the data points. ``rmXY[;1]`` are the x-coordinates and ``rmXY[;2]`` are the y-coordinates. .. us.params **Parameters** .. uparam:: hData The handle of a dataset created with :ref:`XYCreate` or :ref:`TYCreate`. .. uparam:: nFirst *nFirst* is the index of the first data point. The first data point of the dataset has the index 1. .. uparam:: nCount *nCount* is the number of points. If *nCount* is greater than the available data points in the dataset, the function returns the available data points: ``nCount = nData - (nFirst-1)``. .. uparam:: bExt This parameter specifies if the function will access the original data or the filtered data. .. list-table:: :header-rows: 1 * - Value - Description * - -1 - If filtered data is available it will access filtered data, otherwise it will access original data. Default value is -1. * - 0 - Access original data. * - 1 - Access filtered data. .. us.comment **Comment** If the function is called with only one parameter all data points are returned. If the function returns the original data the scaled data is returned (see :ref:`XYSetScaleOffset`). .. us.example **Example** :: x = linspace(1, 100); y = sin(x); hvHandle = plot(x,y); hData = hvHandle[3]; nCount = XYGetNumberOfPoints(hData); // Get the last 50 points. Index: 51, 52, ... , 100 rmXY = XYGetData(hData, nCount - 50 + 1, 50); **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.20.0 - *nCount* modified. The parameter can be set to a number of points greater than the available data points. .. seealso:: :ref:`overview-xy-datasets`, :ref:`XYSetData`, :ref:`XYCreate`, :ref:`XYSetGetOrgDataFlag` :sub:`id-1966329`