XYCreateΒΆ

XYCreate creates a new 2D dataset.

hData = XYCreate(ssName)
hData = XYCreate(ssName, rvX, rvY)
hData = XYCreate(ssName, rvX, rvY, hDoc)

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.

Parameters

ssName

ssName is the name for the dataset.

rvX

rvX is a vector with x-coordinates.

rvY

rvY is a vector with y-coordinates.

hDoc
hDoc is the handle of a document.
Beginning with UniPlot 5.3 this parameter is ignored.

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.

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()

History

Version Description
5.3.0 Call with one parameter creates an empty dataset.

id-769003