Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
How to add 3rd Y-axis at right side?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/301018/image.png)
Risposta accettata
46 Commenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/301908/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/302948/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/303629/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/304311/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/304627/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/304651/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305423/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305455/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306075/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306287/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306295/image.png)
- put the legend on the bottom (southoutside)
- Set the orientation of the legend to horizontal (see documentation)
- And then set the number of columns of the legend to 3 which will create a 2x3 legend (two rows). See "NumColumns" property of the legend.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306407/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306435/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306763/image.png)
- The line is called before your legend is even produced.
- Your legend is stored in 'ldg', not 'leg'. So, that line of code has no effect on the legend.
- Link the axes positions after all of your plotting and labeling is done. linkprop([ax1,ax2],'position').
- Add the legend to the bottom. Your legend inputs look OK but the legend shoudld be added after you're done with plotting and labeling and after using linkprop().
- . Move the legend downward by setting the 2nd position element of the legend to 0.01.
- Set position #4 to ax2 to 0.65.
- Set position #2 to ax2 to 0.27
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/307938/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/307954/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/307959/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/308600/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/308603/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/309362/image.png)
Più risposte (0)
Vedere anche
Categorie
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)