How can I plot 3 variables on y axis for the same variable on x axis in one plot?

조회 수: 39 (최근 30일)
I used 'yyaxis' left and right for plotting two variables and then tried 'addaxis.m' fucntion to add another axis. But there seems to be an error with the 'colorord' part.
Is there another way of doing this??
Any help would be great!
Thank you.
link for the package addaxis.m i used :
  댓글 수: 2
darova
darova 2020년 4월 29일
Don't want to use subplot? OR just scale all data in one plot?
Sahil Patel
Sahil Patel 2020년 5월 1일
I needed it in one plot. Anyway thank you i found the issue.

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

답변 (1개)

Prasad Reddy
Prasad Reddy 2020년 4월 30일
you can use " hold on " command.
you can write your code in the following manner.
plot(x,y1)
hold on
plot(x,y2)
hold on
plot(x,y3)
this will work
%% please give up thumb if this code works.

카테고리

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