![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173719/image.png)
position of legend contour plot
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michiel
am 7 Mär. 2015
Kommentiert: Star Strider
am 7 Mär. 2015
I have a contour plot obtained via the function "contour", and it places the legend inside the figure. For regular plots there is this additional option to specify the location of the legend, however it does not seem to exist for the contour function. Is there anyway I can move it outside of the figure?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Mär. 2015
Bearbeitet: Star Strider
am 7 Mär. 2015
Use one of the ‘...outside’ 'Location' options:
M = magic(10);
figure(1)
contour(M)
legend('Data','Location','northeastoutside')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173719/image.png)
2 Kommentare
Star Strider
am 7 Mär. 2015
There are version differences, so the exact syntax can vary. This works with R2014b.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend 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!