Code covered by the BSD License  

Highlights from
Colormap: "Fire" optimized for print

5.0

5.0 | 3 ratings Rate this file 24 Downloads (last 30 days) File Size: 2.52 KB File ID: #31761
image thumbnail

Colormap: "Fire" optimized for print

by Matthias Geissbuehler

 

12 Jun 2011 (Updated 14 Jun 2011)

Colormap that increases linearly in lightness but incorporates additional colors

| Watch this File

File Information
Description

Colormap that increases linearly in lightness (such as a pure black to white map) but incorporates additional colors that help to emphasize the transitions and hence enhance the perception of the data.

This colormap is designed to be printer-friendly both for color printers as as well as B&W printers.

The colormap is "save" for being viewed by persons with a color deficiency.
The simulation of the color deficiencies shown in the screenshot has been done with www.vischeck.com

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
13 Jun 2011 Matthias Geissbuehler

You might also be interested in my other colormap-contribution: "isolum" a colormap that keeps the luminescence constant while incorporating as many colors as possible:
http://www.mathworks.com/matlabcentral/fileexchange/31762-colormap-isolum-optimized-for-print-color-vision-deficiency

14 Jun 2011 John D'Errico

Some interesting ideas that I like here, plus a few things that I don't like at all.

The code has enough help in the beginning, but it lacks one very important tool - an H1 line. The H1 line is the very first line of comment. (Look at ANY matlab function provided by The MathWorks. What is the first comment line? For example besselj.)

The H1 line contains a descriptive line of text that explains what the function does. It includes key words that a user will search for. When you provide an H1 line, it enables lookfor to work. In the example, suppose I wanted to use a bessel function, but I did not remember that besselj is the tool I needed? I would type in matlab

lookfor bessel

Matlab will not respond with a list of names of half a dozen functions that do something with bessel functions, as well as those descriptive H1 lines that were so thoughtfully provided.

In your case, the very first line of comment that you provided was less helpful:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The only search that will ever find your code using lookfor will be a rather uninteresting search. Face it, not everybody will remember the name "fireprint" next month or next year, or even next week, when they want to use the code they downloaded. This is what lookfor enables.

The next thing I don't like is the use of a non-standard MATLAB interface. Arguments must be provided as a structure. The MATLAB paradigm is to use property/value pairs for a problem like this. In this code, you must provide a structure with field names of .minColor, .maxColor, and .invert.

Requiring correctly spelled field names, including correct capitalization is not terribly friendly.

14 Jun 2011 Matthias Geissbuehler

Thank you John, for this constructive comment. The code has been modified as you suggested! I admit I was not aware of these conventions with the H1 line. Thanks for pointing it out!

14 Jun 2011 John D'Errico

I've had some time to play with this now. Neat. I spent some time many years ago working with simulations of color blindness, so I am quite happy to see the authors provide this utility.

02 Aug 2011 Daniel  
Please login to add a comment or rating.
Updates
13 Jun 2011

Modified the colormap in a way that it does not rely on Image Processing Toolbox to convert from CMYK colors to RGB.

14 Jun 2011

Added default matlab-argument parsing style as suggested by a user. Additionally modified the comment section to be compliant with the default matlab-standard as suggested by the same user.

Tag Activity for this File
Tag Applied By Date/Time
colormap Matthias Geissbuehler 13 Jun 2011 09:42:35
linear ramp Matthias Geissbuehler 13 Jun 2011 09:42:35
black and white Matthias Geissbuehler 13 Jun 2011 09:42:35
fire Matthias Geissbuehler 13 Jun 2011 09:42:35
lut Matthias Geissbuehler 13 Jun 2011 09:42:35
lookuptable Matthias Geissbuehler 13 Jun 2011 09:42:35
cmyk Matthias Geissbuehler 13 Jun 2011 09:42:35
print Matthias Geissbuehler 13 Jun 2011 09:42:35
printer friendly Matthias Geissbuehler 13 Jun 2011 09:42:35
data display Matthias Geissbuehler 13 Jun 2011 09:42:35
color Matthias Geissbuehler 13 Jun 2011 09:42:35
colorblind Matthias Geissbuehler 13 Jun 2011 09:42:35
colorblindness Matthias Geissbuehler 13 Jun 2011 09:42:35

Contact us at files@mathworks.com