
Create Menus for a Programmatic GUI
This code associates the context menu with the figure and with the axes by
setting the
UIContextMenu property of the figure and the axes to the handle
cmenu of the context menu.
set(fh,'UIContextMenu',cmenu); % Figure
set(ah,'UIContextMenu',cmenu); % Axes
11-85