plotAddTS

Purpose

Adds a curve of time series data to an existing time series plot.

Format

plotAddTS([myPlot, ]dtstart, frequency, y)
Parameters:
  • myPlot (struct) – Optional argument. A plotControl structure.

  • dtstart (scalar) – starting date in DT scalar format.

  • frequency (scalar) –

    frequency of the data per year. Valid options include:

    1

    Yearly

    4

    Quarterly

    12

    Monthly

  • y (Nx1 or NxM matrix) – Each column contains the Y values for a particular line.

Examples

// Create some data to plot
y = rndn(100, 1);

// The first input starts the series in January of 1982
// The second input specifies the data to be monthly
plotTS(1982, 12, y);

y2 = rndu(28, 1);

// Add the data from 'y2' as quarterly data
// starting in Q2 of 1980
plotAddTS(198004, 4, y2);

Remarks

You may only add time series graphs to other time series graphs. For more information on time series graphs, see Time Series Plots in GAUSS, Section 1.1.

By default missing values in the y variable will be represented as gaps in the line.