Is there any way i could plot the two different data on two different plots with different axis scaling?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Here's the problem. I have data set A=[50X2] and B=[1x50] ,C=[1X50]. It is required to plot: A(:,1) vs A(:,2), and plot: B vs C. Here's the command we tried. figure (1), scatter(A(:,1),A(:,2) figure(2), scatter(B,C)
Issue: both the plots are on same scale. we have tried using axis auto, axis manually for each plots but they are appearing on the same scale.
Answers (1)
Azzi Abdelmalek
on 20 Nov 2014
t=1:10
A=[t' sin(t')]
x=A(:,1);
y=A(:,2);
B=1:100;
C=10*cos(B)
[ax,h1,h2]=plotyy(x,y,B',C')
set(ax(2),'xlim',[min(B) max(B)],'xaxislocation','top')
set(ax(1),'xlim',[min(x) max(x)],'xaxislocation','bottom')
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!