Code covered by the BSD License  

Highlights from
multiplotyyy

5.0

5.0 | 1 rating Rate this file 24 Downloads (last 30 days) File Size: 2.46 KB File ID: #39595
image thumbnail

multiplotyyy

by Laura Proctor

 

08 Jan 2013 (Updated 10 Jan 2013)

MULTIPLOTYYY allows the user to plot multiple lines on three sets of y-axes.

| Watch this File

File Information
Description

MULTIPLOTYYY plots using three sets of y-axes values. Additionally, multiple lines can be plotted against each y-axis. Therefore, the inputs to the function must be grouped into cell arrays.

Here is an example call to the function:
x1 = (0:0.01:1)';
x2 = (0:0.1:1)';
x3 = (0:0.05:1)';
y1 = x1;
y2 = x2.^2;
y3 = x3.^3;
y4 = sin(x1);
y5 = fliplr(2*x1.^2);
y6 = 7*cos(x1);
y7 = 7*log(x1+1.2);
ylabels{1}='First y-label';
ylabels{2}='Second y-label';
ylabels{3}='Third y-label';
[ax,hlines] = multiplotyyy({x1,y1,x2,y2,x3,y3,x1,y4},{x1,y5},{x1,[y6,y7]},ylabels);legend(cat(1,hlines{:}),'a','b','c','d','e','f','g','location','w')

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File  
Everyone's Tags
multiple axes, plotyyy(3)
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
11 Apr 2013 Giacomo Alessandroni  
09 Jan 2013 R

Couple of mistakes in the example, but otherwise works as advertised, thanks!

Updates
10 Jan 2013

I fixed the mistakes in the original example call.

Contact us