Stacked Time Series Plots

Version 1.1.0.0 (227 KB) by ams92
Tools to plot and manage vertically stacked time series with a common x axis.
664 Downloads
Updated 23 Jan 2017

View License

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
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Graphics Performance in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.21.0.0

fixed description

1.2.0.0

changed name

1.1.0.0

changed file name
Fixes problem with positioning of yaxis labels

1.0.0.0