Jiro's pick this week is Vivid Colormap by Joseph Kirk.
Good uses of colors can help convey ideas effectively. It can help you accentuate certain concepts. Or you may need to use
a gradient color that translates well when printed in gray scale. Joseph's entry really caught my attention. As the name suggests,
it produces quite a vivid colormap. The idea is ingenious; he creates a gradient within each color, and that produces an accent
at each level.
Let's see how it works. We'll first create a blue and red diverging color map, which gradually changes from blue to red with
white in the center. We'll use the peaks function as the sample image.
Notice how vivid it looks! vivid also has additional options to change the level of gradients.
colormap(vivid(cmap, [.4, .6]));
colormap(vivid(cmap, [0, 1]));
You can also get the regular colormap behavior:
colormap(vivid(cmap, [.5 .5]));
More on Colormaps
As I was writing this post, I learned quite a bit about colormaps. MATLAB has a set of standard colormaps described here. There are a few File Exchange entries that create additional colormaps, such as cbrewer, othercolor, and Color Palette Tables. There are also colormaps that would look nice when printed on a grayscale printer - Lab color scale and colorGray.
I also found a couple of entries that would have helped me with creating the blue/red diverging colormap - bluewhitered and makeColorMap.
Check out all the File Exchange entries on colormaps! If you have your favorite colormap, let us know here or try Joseph's vivid and leave a comment for him.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.