Code covered by the BSD License  

Highlights from
Draw two figures with separate x and y axis

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 2.23 KB File ID: #31944
image thumbnail

Draw two figures with separate x and y axis

by

 

This script plots two sets of 1D data on the same figure.

| Watch this File

File Information
Description

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

Acknowledgements

This file inspired Fancy Dual Graphs.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
27 Jun 2011 Nassim Khaled

Hi Jan. Thanks for the constructive comment.You are right(in all of what you said). This function is very similar to plotyy, yet people are always asking about this, and for some reason, it is easier to find these files on Matlab central than Matlab help.

24 Jun 2011 Jan Simon

"[0:.3:40]" is less efficient than "0:.3:40".
It might be helpful to mention Matlab's built-in PLOTYY in a "See also" line, because it does almost the same.

Contact us