Stacked Time Series Plots
Summary: The functions in this package allow a user to construct a figure with several time
series of different variables with different units, all on the same x axis (time, presumably). Each
variable type is presumably given its own axis. For example, in the case of ice core time series of
temperature, CO2, CH4, etc., each of these would get its own axis. One might desire to plot
several ice core records of temperature, in this example. This package allows up to four plots on
each axis. Therefore, a user could plot the temperature records from e.g. Siple Dome, Vostok,
and NGRIP all on one axis, and the CO2 records from EDML and WAIS Divide on the axis
below. Other functions included allow the user to easily switch between axes (setting one to be
active at a time), generate legends, and plot shaded regions (patches) as is commonly done for
paleoclimate stacked time series plots (e.g. D/O events and Heinrich events shaded).
Documentation (comments) in each function’s .m file give more detail and examples, as well as
the example runnable script.
Functions:
-ts_figure
-ts_subplot
-ts_legend
-ts_patch
-ts_activate
Examples:
-ts_example.m (executable script)
-example.jpg (example figure generated by script)
Cite As
ams92 (2026). Stacked Time Series Plots (https://www.mathworks.com/matlabcentral/fileexchange/60990-stacked-time-series-plots), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
