DADiSP Worksheet Functions > Function Categories > XY Functions > XYDTTAB

 

XYDTTAB

Purpose:

Creates a table of multiple XY series from date, time and Y series.

Syntax:

XYDTTAB(data, date, time, collist, interval)

data

-

A table or series of Y values.

date

 

Optional. A series or integer. A series of date values or the column number in data containing the date values. Defaults to the first column in data.

time

-

Optional. A series or integer. A series of time values or the column number in data containing the time values. Defaults to the second column in data.

collist

-

Optional. A series or column number from data to use as the Y values. Defaults to all the columns except the date and time column.

interval

-

Optional. A real specifying the interpolation interval.

-2.0:

No interpolation, return XY series (default).

-1.0:

Automatically determine interpolation interval.

0.0:

Create interval series but preserve all Y values.

> 0.0:

Use the specified interpolation interval.

Returns:

A table of one or more XY series or interpolated interval series.

Example:

W1: julstr(getdate)..julstr(getdate)+9;setvunits("Daily")

W2: todstr(gettime)..todstr(gettime)+9;setvunits("Time")

W3: randn(10, 3);setvunits("V", -1)

W4: ravel(W1, W2, W3)

W5: xydttab(w4)

W6: getitem(W5, 2)

 

W1 contains a series of 10 Julian dates starting from the current date.

 

W2 contains a series of 10 time values starting from the current time.

 

W3 contains 3 columns of random values where each column contains 10 samples. The units for each column is set to "Volts".

 

W4 combines W1, W2 and W3 to yield a 5 column table.

 

W5 converts the table in W4 to a table of XY series where the first column is the date values, the second column is the time values and the remaining columns are the Y values. The resulting  table contains 3 XY plots (a total of 6 columns).

 

W6 returns the second XY plot from W5.

Example:

W1: julstr(getdate)..julstr(getdate)+9;setvunits("Daily")

W2: todstr(gettime)..todstr(gettime)+9;setvunits("Time")

W3: randn(10, 3);setvunits("V", -1)

W4: ravel(W1, W2, W3)

W5: stripchart(xydttab(w4))

 

Same as above except W5 displays the three XY plots as a single STRIPCHART.

Example:

W1: julstr(getdate)..julstr(getdate)+9;setvunits("Daily")

W2: todstr(gettime)..todstr(gettime)+9;setvunits("Time")

W3: randn(10, 3);setvunits("V", -1)

W4: ravel(W1, W2, W3)

W5: stripchart(xydttab(w4, 1, 2, 43200.0))

 

W1 contains a series of 10 Julian dates starting from the current date.

 

W2 contains a series of 10 time values starting from the current time.

 

W3 contains 3 columns of random values where each column contains 10 samples. The units for each column is set to "Volts".

 

W4 combines W1, W2 and W3 to yield a 5 column table.

 

W5 converts the table in W4 to a table of regularly sampled interval series with a DELTAX of 42300 seconds (1/2 day). The resulting  table contains 3 interval series (a total of 3 columns) and the result is plotted as a STRIPCHART.

Remarks:

XYDTTAB creates a table of XY plots from a table where typically one column is the date data, another column is the time data and the remaining columns are the Y data. By default, the first column of the input table is considered the date values, the second column is considered the time values and the remaining columns are the Y values.

 

See XYINTERP for a discussion of interval series and XY interpolation.

 

Use GETITEM  to extract a specific XY plot from the result.

 

See XYTAB to create a table of XY plots from X and Y data.

 

To configure the X Axis to display both date and time values, use:

 

SETCONFIG("dt_scales_format", 1)

See Also:

DTXY

GETITEM

JULSTR

JULYMD

STRIPCHART

XY

XYDT

XYINTERP

XYTAB