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.
Example:
imagesc(peaks(500))
colormap(cold); colorbar
Example:
load topo
imagesc(0:360,-90:90,topo), axis xy
colormap(cold); colorbar
Joseph Kirk (2021). Cold Colormap (https://www.mathworks.com/matlabcentral/fileexchange/23865-cold-colormap), MATLAB Central File Exchange. Retrieved .
Inspired: real2rgb & colormaps, Perceptually improved colormaps, AdvancedColormap, CubeHelix Colormap Generator: Beautiful and Versatile!, ColorBrewer: Attractive and Distinctive Colormaps
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Hi Joseph,
Great code. I also found that this code works;
cmap = colormap(1-hot);
cmap(1,:) = [1 1 1]; %Pure white
I like your submission. Simple, well written code. Your example inspired me to make a similar one for my Perceptually improved colormaps submission.
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.