www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mvgraph4d/cmapgui.m

    function cmapgui(gr)
%CMAPGUI GUI for editing the colormap
%
%  CMAPGUI(OBJ) displays a dialog for editing the colormap of the object.

%  Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc.


figh = get(gr.axes,'Parent');

PR = xregGui.PointerRepository;
ptrID = PR.stackSetPointer(figh, 'watch');

cmapnow = get(gr, 'Colormap');
cmap = uisetcolormap(cmapnow,NaN);
if ~(isscalar(cmap) && cmap==0)
    set(gr,'Colormap',cmap);
end

PR.stackRemovePointer(figh, ptrID)