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.
Doug Hull (2021). MakeColorMap (https://www.mathworks.com/matlabcentral/fileexchange/17552-makecolormap), MATLAB Central File Exchange. Retrieved .
Inspired: myColorMap, Perceptually improved colormaps, Ogive optimization toolbox
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.
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?
Works perfectly
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.
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.
Thank you for the code! It works well. I'm wondering how you made the color blocked in the image
This is brilliant - just what I needed.
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.
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.
really helps my university-project further. very useful :)
very useful tool.
Very easy to use with good results.