custom colormap

sets the colormap according to monotonically increasing user defined ranges
ダウンロード: 876
更新 2012/6/19

ライセンスの表示

This function is useful if you don't want to use the linear scaled colormap that are the default in Matlab.

USAGE:
CUSTOMCMAP(cbar_labels,user_cmap,minMaxValues)

% INPUT:
% cbar_labels - Vector (n x 1) of monotonically increasing ranges of data
% user_cmap - Matrix ((n-1) x 3) of colormap you want to see
% minMaxValues - Vector (2 x 1) of minimum and maximum value of data
% that is plotted
%
%
% EXAMPLES:
data = rand(10,10);
minVal = min(min(data));
maxVal = max(max(data));
image(data,'CDataMapping','scaled');
cbar_labels = [0 0.12 0.2 0.3 0.5 0.6 0.75 0.8 1]; % user defined ranges
user_cmap = jet(8); % user defined colormap
customcmap(cbar_labels,user_cmap,[minVal maxVal])

Bug and comments are welcome.

引用

Durga Lal Shrestha (2024). custom colormap (https://www.mathworks.com/matlabcentral/fileexchange/36501-custom-colormap), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersColormaps についてさらに検索
タグ タグを追加
謝辞

ヒントを与えたファイル: Valcolor

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

Minor bug fixed.

1.0.0.0