position of legend contour plot
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2015-3-7
编辑:Star Strider
2015-3-7
Use one of the ‘...outside’ 'Location' options:
M = magic(10);
figure(1)
contour(M)
legend('Data','Location','northeastoutside')
2 个评论
Star Strider
2015-3-7
There are version differences, so the exact syntax can vary. This works with R2014b.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!