Stacked line plot

Stacked line plots from a matrix or vectors
Updated 5 May 2018

NOTE: this function is now available from the IoSR Matlab Toolbox as iosr.figures.multiwaveplot.
Multiwaveplot draws a series of stacked waves (one on top of the other) contained in the rows of an input 2-D matrix. Each wave has a designated row on the plot. Data may also be specified as vectors X, Y, and Z. The plot is similar to a cascade or waterfall plot.

Cite As

Christopher Hummersone (2024). Stacked line plot (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

Migrated to GitHub.
Fixed how function handles y-scale-ends, and updated documentation.

Added option to reverse y-axis direction.

Reconfigured interface. Added horizon options and support for vector inputs.

Minor tweak to how y-axis min is calculated.

Corrected two bugs: one where scale would be recursively updated depending on magnitude order in wave, and the other where y axis min was erroneous if gain was set.

Added trap for cases where input contents are all zero (or, at least one row is).

Corrected ylim so that top row is not cropped when gain is applied.

Some bug fixes and efficiency savings. Updated documentation.

Minor updates to example and validation; new screenshot.

Tidied up, updated description

Ooops, forgot to check the MODE argument

Added optional plotting mode argument: 'fill' or 'plot'. 'plot' is useful for fine structure plotting, 'fill' is useful for correlograms. Tidied up input validation.

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.