File Exchange

image thumbnail

Modified CMRmap

version (150 KB) by Christopher Hummersone
Produces a colour colormap, of arbitrary length, that is monochrome-compatible.

1 Download

Updated 05 May 2018

From GitHub

View Version History

View license on GitHub

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].


axis image;


[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).

Cite As

Christopher Hummersone (2021). Modified CMRmap (, GitHub. Retrieved .

Comments and Ratings (1)

Joao Henriques

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!