.. highlightlang:: us .. _auto_xy_createdataset: auto_xy_CreateDataset ===================== .. index:: auto_xy_CreateDataset .. us.tag auto_xy_CreateDataset NOTREADYENGLISH auto_xy :ref:`auto_xy_CreateDataset` creates a new 2D dataset. .. function:: hDataNew = auto_xy_CreateDataset(hLayer, ssName, rvX, rvY) .. us.return **Return Value** *hDataNew* .. us.params **Parameters** .. uparam:: hLayer *hLayer* is the handle of the diagram. The handle of a diagram can be received with the :ref:`PageGetLayerHandle` function (see example). .. uparam:: ssName *ssName* is the dataset name. .. uparam:: rvX *rvX* is a vector with x-coordinates. .. uparam:: rvY *rvY* is a vector with y-coordinates. .. us.example **Example** :: hPage = auto_LoadTemplate("tpl_ger", "2 Diagramme"); PageSetTitle(hPage, "Example"); hLayer1 = PageGetLayerHandle(hPage, "Diagramm 1"); hLayer2 = PageGetLayerHandle(hPage, "Diagramm 2"); x = linspace(0,2*PI); y = sin(x); auto_xy_CreateDataset(hLayer1, "Sinus", x, y); y = cos(x); auto_xy_CreateDataset(hLayer2, "Cosinus", x, y); auto_ScaleAxes(); auto_UpdatePage(); auto_SaveDocumentAs("/Example.ipw") .. seealso:: :ref:`overview-automation`, :ref:`auto_LoadTemplate`, :ref:`auto_LoadDataset`, :ref:`PageGetLayerHandle` :sub:`id-633405`