File Exchange

image thumbnail

Cold Colormap

version (1.41 KB) by Joseph Kirk
Creates a COLD colormap that complements the built-in HOT colormap


Updated 29 Apr 2009

View Version History

View License

COLD Black-Blue-Cyan-White Color Map

COLD(M) returns an M-by-3 matrix containing a "cold" colormap
COLD, by itself, is the same length as the current figure's colormap. If no figure exists, MATLAB creates one.

colormap(cold); colorbar

load topo
imagesc(0:360,-90:90,topo), axis xy
colormap(cold); colorbar

Cite As

Joseph Kirk (2021). Cold Colormap (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Jonathan Morris

Sarah Blum

Dylan Gaeta

David Franco

German Martinez

Matt Amaro

Hi Joseph,
Great code. I also found that this code works;

cmap = colormap(1-hot);
cmap(1,:) = [1 1 1]; %Pure white

Matteo Niccoli

I like your submission. Simple, well written code. Your example inspired me to make a similar one for my Perceptually improved colormaps submission.

John D'Errico

You might add a see also for cool, an existing colormap with a slightly different shape in terms of colors.

Regardless, this adds another colormap option. As always, the help is what I'd expect.

MATLAB Release Compatibility
Created with R2008a
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!