Modified CMRmap

Produces a colour colormap, of arbitrary length, that is monochrome-compatible.
798.0 次下载
更新时间 2018/5/5

NOTE: this function is now available from the IoSR Matlab Toolbox as iosr.figures.cmrMap.
-------------------------
Create a monochrome-compatible colour map

cmap = CMRmap
cmap = CMRmap(M)

cmap = CMRmap returns a colour map CMAP (varying black - purple - red - yellow - white) that is monochrome-compatible, i.e. it produces a monotonic greyscale colour map. CMAP is size Mx3, where M is the length of the current figure's colormap. If no figure exists, MATLAB creates one.

cmap = CMRmap(M) sets the colormap length to M.

The map is a slight modification to that suggested in [1].

EXAMPLE

figure;
imagesc(peaks(1000));
colormap(CMRmap(256));
axis image;
colorbar

REFERENCE

[1] Rappaport, C. 2002: "A Color Map for Effective Black-and-White Rendering of Color Scale Images", IEEE Antenna's and Propagation Magazine, Vol.44, No.3, pp.94-96 (June).

引用格式

Christopher Hummersone (2024). Modified CMRmap (https://github.com/IoSR-Surrey/MatlabToolbox), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Greyscale 的更多信息

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.1.0.0

Migrated to GitHub.

1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库