Plot with multiple Y-axes

version (9.61 KB) by Tom R
Plotting function that allows for N y-axes using a common x axis


Updated 11 Aug 2019

View License

This function allows for results to be plotted on N separate y-axes. These y-axes share a common x axis, but do not need to share exactly the same x/y data or size. The function supports all utilities on the Figure toolbar, including the data tip, zoom/pan, and data brush. The plot scales upon resize of the figure, maximizing the utilization of the figure's space. The function supports many of the native property commands and syntax for 'plot' such as 'LineStyle','MarkerStyle',etc.. Additionally, saving and loading as .fig is supported, as well as all other MATLAB supported image types.

Cite As

Tom R (2022). Plot with multiple Y-axes (, MATLAB Central File Exchange. Retrieved .

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

Inspired: plotNAx

Community Treasure Hunt

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

Start Hunting!