Is there any way i could plot the two different data on two different plots with different axis scaling?

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)

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

Asked:

on 20 Nov 2014

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!