To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
When I add a line object to my plot, the legend is for some reason pushed into the background behind the plot axis, where it is hidden. Why does this happen and how do I bring it into the foreground again?
No products are associated with this question.
I cannot reproduce this with:
plot(1:10) legend('plot') line([5 5],[0 10])
So I want to ask what your code looks like. If you only have the one plot axes and the legend (no uicontrols or other figure children), then this will bring the legend back:
If you have other figure children, the idea is the same, you will just have to be more careful about the rearrangement.