How to plot 3 y axis or more in a single graph?
473 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
UTKARSH VERMA
il 13 Gen 2018
Commentato: Alessandro De Iasio
il 23 Set 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 Commenti
Risposta accettata
ANKUR KUMAR
il 14 Gen 2018
Modificato: ANKUR KUMAR
il 14 Gen 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'})
Più risposte (2)
Jan
il 13 Gen 2018
Modificato: Jan
il 13 Gen 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 Commenti
yeswanth reddy
il 29 Set 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 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!