How to plot 3 y axis or more in a single graph?

조회 수: 699 (최근 30일)
UTKARSH VERMA
UTKARSH VERMA 2018년 1월 13일
댓글: Alessandro De Iasio 2022년 9월 23일
For example: I have to plot X=(1:1:50); Y1=sin(X); Y2=exp(X); Y3=(X).^2; For y-plot I want respective adjusted range of axis.
  댓글 수: 2
Roy Kadesh
Roy Kadesh 2018년 1월 13일
What do you mean? Do you mean you want to plot 3 lines in one figure?
UTKARSH VERMA
UTKARSH VERMA 2018년 1월 13일
편집: UTKARSH VERMA 2018년 1월 13일
I want 3 line in one graph but with 3 axis representing their respective line. For example for Y1 yaxis value range should of range between -1 to 1 but if i use exp(i.e. Y2) axis to represent Y1 then it may give straight line.

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

채택된 답변

ANKUR KUMAR
ANKUR KUMAR 2018년 1월 14일
편집: ANKUR KUMAR 2018년 1월 14일
plot((1:5),randi(25,1,5),'r')
addaxis((1:5),randi(25,1,5),'g')
addaxis((1:5),randi(25,1,5),'m')
addaxis((1:5),randi(25,1,5),'y')
legend({'plot1','plot2','plot3','plot4'})
  댓글 수: 10
Alessandro De Iasio
Alessandro De Iasio 2022년 9월 23일
Was anyone able to plot more than one curve for the nth axis?

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

추가 답변 (2개)

Jan
Jan 2018년 1월 13일
편집: Jan 2018년 1월 13일
  댓글 수: 4
UTKARSH VERMA
UTKARSH VERMA 2018년 1월 14일
Yes, I want to know how to use that function.
Jan
Jan 2018년 1월 14일
편집: Jan 2018년 1월 14일
Simply download it and call it. The help section of this function explains the details. Or see the suggestion of ANKUR KUMAR.

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


yeswanth reddy
yeswanth reddy 2021년 9월 29일
plot((1:5),randi(25,1,5),'r')
addaxis((1:5),randi(25,1,5),'g')
addaxis((1:5),randi(25,1,5),'m')
addaxis((1:5),randi(25,1,5),'y')
legend({'plot1','plot2','plot3','plot4'})

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by