So, I have a legend (on a plot) in an application I'm working on. If you right click on it a bunch of optional actions come up. These include things like 'Interpreter', 'Location', 'Orientation', etc.. I know that one can overwrite this menu by setting your own uicontextmenu set(axes,'uicontextmenu',newmenu), but how do you just edit it? What if I wanted to prevent a user from adjusting the legend's location but nothing else?
Is this kind of customisation possible? Here's the code I've been testing/messing with this on.
x = 1:20;
y = cos(x);
z = sin(x);
plot(x,y);
hold on
plot(x,z);
lg = legend('stuff1','stuff2');
% remove the menu altogether
%set(lg,'uicontextmenu','')
I am running R2014b
EDIT: To be completely clear, I want to be able to remove some options from an existing uicontextmenu (that I did not create explicitly), but not all.
