필터 지우기
필터 지우기

plot double y axis, 3 curves

조회 수: 1 (최근 30일)
Thar
Thar 2015년 7월 9일
댓글: Thar 2015년 7월 9일
Hi all!
I have the data:
x1=sza1(:,1);
y1=I1(:,1);
x2=sza2(:,1);
y2=I2(:,1);
y3=I3(:,1);
I want to plot: plot(x1,y1,'ob',x2,y2,'-or',x2,y3,'-ok');
but i want x2,y2, x2,y3 have different y axis from x1,y1.
Any ideas?
Thank you!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 9일
편집: Azzi Abdelmalek 2015년 7월 9일
If your data are column vector
[ax,h1,h2]=plotyy(x1,y1,x2,[y2 y3])
set(h1,'linestyle','none','marker','o','color','b')
set(h2(1),'linestyle','-','marker','o','color','r')
set(h2(2),'linestyle','-','marker','o','color','k')
  댓글 수: 1
Thar
Thar 2015년 7월 9일
Thank you very much!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by