MATLAB: Position of legend contour plot

contourlegendlocationposition;

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?

Best Answer

Use one of the ‘...outside’ 'Location' options:
M = magic(10);
figure(1)
contour(M)
legend('Data','Location','northeastoutside')
Related Question