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

448 次查看(过去 30 天)
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
Was anyone able to plot more than one curve for the nth axis?

请先登录,再进行评论。

更多回答(2 个)

Jan
Jan 2018-1-13
编辑:Jan 2018-1-13
  4 个评论
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