image thumbnail

stackedplot: A quick way to plot without lines overlapping

version (7.83 KB) by Kesh Ikuma
Plotting multple lines on the same axes with properly spaced offsets


Updated 04 Nov 2015

View License

Stackedplot wraps the built-in plot function to post-process the plotted lines, spacing them out so each lines can be observed easily. Makes it a quick (if not the quickest) way to inspect multi-channel data.
* Just works. Simply add "stacked" in front of an existing "plot" command line to spread the plots out
* Can spread on either x and y axis via PlotOrder parameter
* A label is automatically added for each plot lines in place of the standard ylabel/xlabel
* Layout is highly customizable via a number of parametric arguments
* Support log plots
* Baseline can be added (think of the built-in "bar" function)
* Baseline and rangelines are automatically adjusted if non-stacked axis limits property is modified

Cite As

Kesh Ikuma (2022). stackedplot: A quick way to plot without lines overlapping (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!