Colourpicking

Choosing colours

UNDER CONSTRUCTION

 

Colour is an important aspect of data visualization. This is especially true when your data consists of multiple dimensions.

image

 

However, how do you choose which colours to use? In Matlab, you can choose from several default options, such as:

 
colormap('jet')
 
and
 
colormap('hsv')
 

Matlab's colourmaps are based on the RGB colour space, which is intended to be used on monitors (cf. CMYK intended for use with printers). For statistical and perceptual purposes, however, this colour space is not optimal. For example, yellow and cyan are perceptually very bright, and these colours cause a perceived break in a linearly scaled RGB colour map. HCL colour space is optimized such that a linear scaling of Hue, given a constant Luminance and Chroma, should yield a constant percept of intensity for most people.

image

More on this can be found in the paper by Zeileis, Horner and Murrell on "Escaping RGBland: Selecting Colors for Statistical Graphics". A nice color brewer.

Here, I will describe how I implemented Zeileis, Horner and Murrell's recommendations in Matlab.

Graph types

Qualitative - Nominal

Sequential - Ordinal, metric

Divergent - Ordinal, metric

image

 

image

PandA

With the PANDA function pa_statcolor it should be easy to create default and customized HCL colormaps for statistical graphs. With the function pa_LCH2RGB one can transform colours defined in HCL space to Matlab's sRGB colours.