.. highlightlang:: us .. _auto_xy_add: auto_xy_Add =========== .. index:: auto_xy_Add .. us.tag auto_xy_Add NOTREADYENGLISH auto_xy :ref:`auto_xy_Add` creates a new dataset from the sum of the y-coordinates of 2D datasets. .. function:: hDataNew = auto_xy_Add(hData, hvData) hDataNew = auto_xy_Add(hData_Layer, hvData) .. us.return **Return Value** *hDataNew* is the handle of the new dataset. .. us.params **Parameters** .. uparam:: hData *hData* is the handle of a 2D dataset. The new dataset, *hDataNew*, will be added to the layer (diagram) where the dataset *hData* is located. .. uparam:: hData_Layer *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. .. uparam:: hvData *hvData* is a vector of handles of 2D Datasets. .. us.comment **Comment** The x-coordinates of all given datasets must be strictly increasing. They do not have to be identical. The new dataset is calculated as following: * The x-range is calculated where all datasets overlap. * Within the new x-range, a new x-coordinate vector (xs) is calculated which contains the x-coordinates of all given datasets. * For each dataset, y-coordinates for the new x-vector xs will be calculated by linear interpolation. * The interpolated y-coordinates are added (yadd). * A new dataset will be created (xs, yadd). .. seealso:: :ref:`overview-automation`, :ref:`PageGetLayerHandle` :sub:`id-1624966`