how to plot multiple curves with plotyy in MATLAB? -
i want draw plot 2 y axes , 1 x axes. 2-d line plot y-axes on both left , right side.
there multiple curves plotted.
for example:
x=1:20 % left y axes y1_1=randn(20,1)*1 + 0 y1_2=randn(20,1)*1 + 5 y1_3=randn(20,1)*1 + 10 % right y axes y2_1=randn(20,1)*1 + 20 y2_2=randn(20,1)*1 + 30 y2_3=randn(20,1)*1 + 40 how can draw this?
you can supply several ys each x:
plotyy( x, [y1_1, y1_2, y1_3], x, [y2_1 ,y2_2, y2_3] ); should trick you.
Comments
Post a Comment