fighand=figure('color','black');
p=surf(peaks);
axis off;
cm=uicontextmenu('visible','on');
set(p,'uicontextmenu',cm);
h1=uimenu(cm,'label','Colormap');
h2=uimenu(cm,'label','Shading');
chsv=uimenu(h1,'label','HSV','callback','colormap(hsv)');
chot=uimenu(h1,'label','HOT','callback','colormap(hot)');
cbone=uimenu(h1,'label','BONE','callback','colormap(bone)');
ccopper=uimenu(h1,'label','COPPER','callback','colormap(copper)');
cflag=uimenu(h1,'label','FLAG','callback','colormap(flag)');
clines=uimenu(h1,'label','LINES','callback','colormap(lines)');
cccube=uimenu(h1,'label','COLORCUBE','callback','colormap(colorcube)');
cjet=uimenu(h1,'label','JET','callback','colormap(jet)');
cprism=uimenu(h1,'label','PRISM','callback','colormap(prism)');
cautumn=uimenu(h1,'label','AUTUMN','callback','colormap(autumn)');
cspring=uimenu(h1,'label','SPRING','callback','colormap(spring)');
cwinter=uimenu(h1,'label','WINTER','callback','colormap(winter)');
csummer=uimenu(h1,'label','SUMMER','callback','colormap(summer)');
interpshading=uimenu(h2,'label','Interp','callback','shading interp');
flatshading=uimenu(h2,'label','Flat','callback','shading flat');
Best Answer