centercolormap.m

来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 19 行

M
19
字号
function centerColorMap(data,trimFrac)%% center the colours so that zero is the central color on the%% colormap%%%% trimFrac help avoid outlier problems.  the larger the data set%% the higher this should be in general%% eg. trimFrac=0.9999%%%% need to call colorbar again to update it%% center the zero color:sortVals = sort(abs(data(:)));%% take 95th percentilemaxVal = sortVals(floor(trimFrac*length(sortVals)));myclim = [-maxVal maxVal];%myclimcaxis(myclim);

⌨️ 快捷键说明

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