How to plot 3 y axis or more in a single graph?
194 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
UTKARSH VERMA
am 13 Jan. 2018
Kommentiert: Alessandro De Iasio
am 23 Sep. 2022
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 Kommentare
Akzeptierte Antwort
ANKUR KUMAR
am 14 Jan. 2018
Bearbeitet: ANKUR KUMAR
am 14 Jan. 2018
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'})
Weitere Antworten (2)
Jan
am 13 Jan. 2018
Bearbeitet: Jan
am 13 Jan. 2018
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 Kommentare
yeswanth reddy
am 29 Sep. 2021
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 Kommentare
Siehe auch
Kategorien
Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!