File Exchange

image thumbnail

MakeColorMap

version 1.3.0.1 (1.94 KB) by Doug Hull
Makes colormaps that smoothly blend from one color to another to optionally a third.

10 Downloads

Updated 01 Sep 2016

View License

Many colormaps like Jet cause your eye to misunderstand important characteristics of your data. It is often best to simply blend from one color to another, or possibly through three. This file will makes such colormaps.

Cite As

Doug Hull (2019). MakeColorMap (https://www.mathworks.com/matlabcentral/fileexchange/17552-makecolormap), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (20)

Eoin McEvoy

SHU-FU SHIH

Great code,however, I have a hard time making a categorical color key with alternative black and white. Something like the build-in "colormap(lines)" but with only black and white!
Is it possible?

Julius Lein

StefanoMas

Works perfectly

cmo

Kevin Quinn

Works beautifully!

Dragon Yang: the error message is telling you that MATLAB cannot find this function on its path. Try downloading the M-file from this website and saving it to your working directory. Any search engine will provide step-by-step instructions too.

dragon yang

I used this function on matlab2012a and it throw error like "Undefined function 'makeColorMap' for input arguments of type 'double'.":
My called codes are belows:
" peaks;
a = makeColorMap([1 0 0],[1 1 1],[0 0 1]);
colormap(a)
colorbar"
Would you give some solution?
Thanks.

Pearl

Thank you for the code! It works well. I'm wondering how you made the color blocked in the image

Pia

This is brilliant - just what I needed.

Bill

very handy. i just have a simple question. How did you make the categorical color key in your figure? It seems hard to it by specifying middle colors. Thank you.

Bill

very handy. i just have a simple question. How did you make the categorical color key in your figure? It seems hard to it by specifying middle colors. Thank you.

Really good submission Doug. And the videos are incredibly useful for someone like me who is just starting the transition from scripts to functions. Thank you.

Dalle Ali

really helps my university-project further. very useful :)

Arthur

very useful tool.

Very easy to use with good results.

Updates

1.3.0.1

Updated license

1.3.0.0

as required toolbox

1.2.0.0

Copyright

1.1.0.0

generating license

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