How to plot 3 y axis or more in a single graph?
조회 수: 746(최근 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
채택된 답변
ANKUR KUMAR
2018년 1월 14일
편집: ANKUR KUMAR
2018년 1월 14일
Use this function from the file exchange https://in.mathworks.com/matlabcentral/fileexchange/9016-addaxis
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
추가 답변(2개)
Jan
2018년 1월 13일
편집: Jan
2018년 1월 13일
Do you mean something like https://www.mathworks.com/matlabcentral/fileexchange/46688-jzplotys-zip or https://www.mathworks.com/matlabcentral/fileexchange/9016-addaxis? Or https://www.mathworks.com/help/matlab/ref/yyaxis.html (this one creates 2 axes only)?
댓글 수: 4
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'})
댓글 수: 0
참고 항목
범주
Find more on Two y-axis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!