.. highlightlang:: us .. _xycreate: XYCreate ======== .. index:: XYCreate .. us.tag XYCreate ENGLISH Changed530 :ref:`XYCreate` creates a new 2D dataset. .. function:: hData = XYCreate(ssName) hData = XYCreate(ssName, rvX, rvY) hData = XYCreate(ssName, rvX, rvY, hDoc) .. us.return **Return Value** If the function succeeds, the return value is the handle of the newly created 2D dataset. If the function fails, the return value is 0. .. us.params **Parameters** .. uparam:: ssName *ssName* is the name for the dataset. .. uparam:: rvX *rvX* is a vector with x-coordinates. .. uparam:: rvY *rvY* is a vector with y-coordinates. .. uparam:: hDoc *hDoc* is the handle of a document. Beginning with UniPlot 5.3 this parameter is ignored. .. us.comment **Comment** The number of elements in *rvX* and *rvY* must agree. The minimum number is 1. A function call without data creates an empty dataset. .. us.example **Example** :: def test() { hDoc = DocCreate(); hPage = PageCreate(); DocAddPage(hDoc, hPage); hLayer = LayerCreate(); PageAddLayer(hPage, hLayer); hData = XYCreate("Test", [1.6,2,4,6.3], [3,5,6.5,1.5]); LayerAddDataset(hLayer, hData); XYShowMarker(hData, 1) LayerAutoScale(hLayer); PageReplot(hPage); } test() .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.3.0 - Call with one parameter creates an empty dataset. .. seealso:: :ref:`overview-xy-datasets`, :ref:`overview-data-file-informations-for-datasets`, :ref:`XYSetData`, :ref:`XYAddData`, :ref:`LayerCreate`, :ref:`TYCreate`, :ref:`DS_SetDataSource` :sub:`id-769003`