TYCreate creates a new y/t datasets (1D dataset).
Return Value
If the function succeeds, the return value is the handle of the newly created 1D dataset. If the function fails, the return value is 0.
Parameters
ssName is the name for the dataset.
rvY is a vector with y-coordinates.The vector must contain at least 2 elements.
hDoc is the handle of a document which will hold the created dataset. Beginning with UniPlot 5.3 this parameter is ignored.
Comment
TYCreate creates a 2D dataset with delta x equal 1 and the first x-coordinate equal 0. These values can be changed with the TYSetMinAndDelta function. The XY...-functions can be used to modify the dataset.
A function call without data creates an empty dataset.
Example
def test_TYCreate()
{
hDoc = DocCreate();
hPage = PageCreate();
DocAddPage(hDoc, hPage);
hLayer = LayerCreate();
PageAddLayer(hPage, hLayer);
hData = TYCreate("Test", [3.5,5,7.5,1.5], hDoc);
LayerAddDataset(hLayer, hData);
TYSetMinAndDelta(hData, [1.5, 2]);
LayerAutoScale(hLayer);
PageReplot(hPage);
}
test_TYCreate();
History
| Version | Description |
|---|---|
| 5.3.0 | Parameter hDoc is ignored |
See also
Overview XY-Datasets, LayerCreate, TYSetMinAndDelta, TYSetData, TYAddData, XYIsTYDataset, XYCreate
id-824057