⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 colormapsshow.m

📁 Matlab下的EEG处理程序库
💻 M
字号:
function [cmap] = ColorMapsShow
% COLORMAPSSHOW - display/select available Matlab colormaps
%
% Example:  figure, colormap(ColorMapsShow), colorbar
%
% See also COLORMAP and COLORBAR.
%

% $Revision: 1.2 $ $Date: 2003/03/02 03:20:43 $

% Licence:  GNU GPL, no implied or express warranties
% History:  01/99 Uilke Stelwagen, Copyright (C) 1992-1999
%           Institute of Applied Physics, TNO-TPD, The Netherlands.
%           09/01 Darren.Weber@flinders.edu.au
%                 - downloaded function from the mathworks, distrib.
%                   under GPL
%                 - adapted function to gui selection of colormap
%                   and return of a prefered map in cmap
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

maps = [
   'hsv        - hue-saturation-value           '
   'hot        - black-red-yellow-white         '
   'gray       - linear gray-scale              '
   'bone       - gray-scale with blue tinge     '
   'copper     - linear copper-tone             '
   'pink       - pastel pinks                   '
   'white      - all white                      '
   'flag       - red, white, blue, & black      '
   'lines      - color map of the line colors   '
   'colorcube  - enhanced color-cube            '
   'jet        - variant HSV (Matlab default)   '
   'prism      - prism                          '
   'cool       - cyan and magenta               '
   'autumn     - red and yellow                 '
   'spring     - magenta and yellow             '
   'winter     - blue and green                 '
   'summer     - green and yellow               '
];

[map,ok] = listdlg('PromptString','Double-Click ColorMap',...
                   'SelectionMode','single',...
                   'ListString',maps,...
                   'CancelString','Done',...
                   'uh',30,'fus',5,'ffs',5,...
                   'ListSize',[200 330]);

figure('menubar','none','NumberTitle','off',...
       'NextPlot','replace');

h = subplot(143);
colorbar(h);

while ok
    
    colormap(deblank(maps(map,1:10)));
    %title(   deblank(maps(map,:)));
    
    [map,ok] = listdlg('PromptString','Double-Click ColorMap',...
                       'SelectionMode','single',...
                       'InitialValue',map,...
                       'ListString',maps,...
                       'CancelString','Done',...
                       'uh',30,'fus',5,'ffs',5,...
                       'ListSize',[200 330]);
                   
end
cmap = colormap;
close gcf

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -