Draw two figures with separate x and y axis

This script plots two sets of 1D data on the same figure.
659 Downloads
Updated 24 Jun 2011

View License

This script plots two sets of 1D data on the same figure with two separate axis and with the same gridding.
The code also checks if the x-axis data are the same, if the x-axis data
are not the same, it draws an additional x-axis on the top of the figure.
The two sets of data with their axes are drawn with two colors for ease of reading

Cite As

Nassim Khaled (2024). Draw two figures with separate x and y axis (https://www.mathworks.com/matlabcentral/fileexchange/31944-draw-two-figures-with-separate-x-and-y-axis), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Two y-axis in Help Center and MATLAB Answers
Acknowledgements

Inspired: Fancy DualGraphs

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0