About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconPerceptually improved colormaps (Scripts) Publisher's description

PMKMP Returns perceptually balanced colormaps with rainbow-like colors

PMKMP Returns perceptually balanced colormaps with rainbow-like colors
PMKMP(N,SCHEME) returns an Nx3 colormap.
usage: map=pmkmp(n,scheme);

JUSTIFICATION: rainbow, or spectrum color schemes are considered a poor choice for scientific data display by many in the scientific community (see for example reference 1 and 2) in that they introduce artifacts that mislead the viewer. "The rainbow color map appears as if it’s separated into bands of almost constant hue, with sharp transitions between hues. Viewers perceive these sharp transitions as sharp transitions in the data, even when this is not the casein how regularly spaced (interval) data are displayed (quoted from reference 1). This submission is intended to share the results of my work to create more perceptually balanced, rainbow-like color maps. Please see output arguments section for descriptions.

arguments: (input)
scheme - can be one of the following strings:
'IsoL' Lab-based isoluminant rainbow with constant luminance L*=60
For interval data displayed with external lighting

'CubicL' Lab-based rainbow scheme with cubic-law luminance (default)
For interval data displayed without external lighting

'Edge' Diverging Black-blue-cyan-white-yellow-red-black scheme
For ratio data (ordered, constant scale, natural zero)

n - scalar specifying number of points in the colorbar. Maximum n=256
If n is not specified, the size of the colormap is determined by the
current figure. If no figure exists, MATLAB creates one.

arguments: (output)
map - colormap of the chosen scheme
- IsoL is based on work in paper 2 in the reference section. In both this paper and in several others this is indicated as the best for displaying interval data with external lighting. This is so as to allow the lighting to provide the shading to highlight the details of interest. If lighting is combined with a colormap that has its own luminance function associated - even as simple as a linear increase this will confuse the viewer. The only difference from the paper is that I changed the value of constant luminance to L*=60 to make it brighter that the authors' example.

- CubicL too is based on some of the ideas in paper 2 in the reference section but rather than using a linearly increasing L* function such as the one used by those authors, I am using a compressive or cubic law function for the increase in L*. L* ranges between 31 and 90 in the violet to yellowish portion of the colormap, then decreases to about 80 to get to the red (please refer to figure L_a_b_PlotsCubicL.png). The choice to start at 31 was a matter of taste. I like having violet instead of black at the cold end of the colormap. The latter choice was so as to have red and not white at the warm end of the colorbar, which is also a matter of personal taste. As a result, there is an inversion in the L* trend, but I believe because it is a smooth one that this is an acceptable compromise and the resulting colormap is much of an improvement over the standard rainbow or spectrum schemes, which typically have at least 3 sharp L* inversions. Please run CompareLabPlotsUsingColorspace.m or see figures: L_plot_for_CubicL_colormap.png, L_plot_for_jet_colormap.png, and L_plot_for_spectrum_colormap.png for a demonstration

- Edge is based on the Goethe Edge Colors described in the book in reference 3. In practice the colormap resembles a cold color map attached to a warm color map. But the science behind it is rigorous and the experimental work is based on is very intriguing to me: an alternative to the Newtonian spectrum. This is not perceptually balanced in a strict sense but because it does not have green it is perceptually improved in a harmonious sense (refer to paper reference 10 for a review of the concept of harmony in color visualization).

Example: 128-color rainbow with cubic-law luminance (default)
% load mandrill;
% imagesc(X);
% colormap(pmkmp(128));
% colorbar;
See files examples.m, examples1.m, and example2.m and associated figures for more examples
See files MakeLabPlotUsingColorspace.m and CompareLabPlotsUsingColorspace.m for some demonstrations


Extensive reference list and list of other FEX submissions of interest included in the help

System Requirements:

MATLAB 7.4 (R2007a)
Program Release Status: Major Update
Program Install Support: Install and Uninstall

Perceptually improved colormaps (Scripts) Tags:

Click on a tag to find related softwares

Is Perceptually improved colormaps (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.