How to plot 3 y axis or more in a single graph?
404 次查看(过去 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'})
更多回答(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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Two y-axis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!