plotArea

Purpose

Creates a stacked area plot.

Format

plotArea([myPlot, ]x, y[, base])
Parameters:
  • myPlot (struct) – Optional argument, a plotControl structure
  • x (Nx1 matrix) – The X values for a particular line.
  • y (Nx1 or NxM matrix) – Each column contains the Y values for a particular line. If y contains more than one column, each column will be stacked on top of the previous column.
  • base (scalar) – Optional argument, the height for the base of the area plot. The default value is zero. plotArea() does not yet support a vector input for base.

Examples

x = { 1, 2, 3, 4 };
y = {   1  1.5  0.9,
      0.8  1.2  1.8,
        1  0.7    2,
      1.2    1  1.2 };

// Draw a cumulative area plot of the columns of 'y'
plotArea(x, y);

See also

Functions plotLogX(), plotLogLog(), plotScatter()