Escaping RGBland: Selecting Colors for Statistical Graphics

Similar documents
Choosing Colors for Data Visualization Maureen Stone January 17, 2006

Expert Color Choices for Presenting Data

Perception of Light and Color

Good Scientific Visualization Practices + Python

Overview. Raster Graphics and Color. Overview. Display Hardware. Liquid Crystal Display (LCD) Cathode Ray Tube (CRT)

Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

Dual Training at a Glance. Last update: 2007

VISUAL ARTS VOCABULARY

Data Visualization Best Practice. Sophie Sparkes Data Analyst

Computer Vision. Color image processing. 25 August 2014

Best Practices in Data Visualizations. Vihao Pham 2014

Best Practices in Data Visualizations. Vihao Pham January 29, 2014

Color Blindness. assessment report ... February 2003 (Revision 2, November 2003) Betsy J. Case, Ph.D.

CBIR: Colour Representation. COMPSCI.708.S1.C A/P Georgy Gimel farb

The Information Processing model

CSU, Fresno - Institutional Research, Assessment and Planning - Dmitri Rogulkin

Advice for Teachers of Colour Blind Secondary School Students

Energy Services Experiences made in Germany

THE BASICS OF COLOUR THEORY

Digital Image Basics. Introduction. Pixels and Bitmaps. Written by Jonathan Sachs Copyright Digital Light & Color

How To Color Print

Color quality guide. Quality menu. Color quality guide. Page 1 of 6

GIS Tutorial 1. Lecture 2 Map design

Multivariate data visualization using shadow

13 PRINTING MAPS. Legend (continued) Bengt Rystedt, Sweden

UNDERSTANDING DIFFERENT COLOUR SCHEMES MONOCHROMATIC COLOUR

Color Theory. Tips & Tricks. Why do some colors work better together than others? More available at artbeats.com. by Chris & Trish Meyer, Crish Design

Company Presentation. Dr. Rüdiger Mrotzek Hans Richard Schmitz. March 2015

The Eye of the Beholder Designing for Colour-Blind Users

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

Research. Investigation of Optical Illusions on the Aspects of Gender and Age. Dr. Ivo Dinov Department of Statistics/ Neuroscience

Microsoft Official Curriculum (MOC) at the COMPAREX Academy

Visualization. For Novices. ( Ted Hall ) University of Michigan 3D Lab Digital Media Commons, Library

RGB Workflow Key Communication Points. Journals today are published in two primary forms: the traditional printed journal and the

Visualizing Data. Contents. 1 Visualizing Data. Anthony Tanbakuchi Department of Mathematics Pima Community College. Introductory Statistics Lectures

BOLLMER INDUSTRY EXCLUSIVE. System services for nutrient recycling

BASIC CONCEPTS OF HAIR PHYSIOLOGY AND COSMETIC HAIR DYES

Germany. nderstand. needs to. startups

Color. & the CIELAB. System

May Technical Brief. Use of Colour in Data Display

A simpler version of this lesson is covered in the basic version of these teacher notes.

Pantone Matching System Color Chart PMS Colors Used For Printing

Principles of Data Visualization for Exploratory Data Analysis. Renee M. P. Teate. SYS 6023 Cognitive Systems Engineering April 28, 2015

Visibility optimization for data visualization: A Survey of Issues and Techniques

Iris Sample Data Set. Basic Visualization Techniques: Charts, Graphs and Maps. Summary Statistics. Frequency and Mode

The basics of storytelling through numbers

3D Data Visualization / Casey Reas

A Short Introduction on Data Visualization. Guoning Chen

Prediction Analysis of Microarrays in Excel

Art Education Color Theory on the Computer Patricia Johnson Computer Graphics Education Consultant

Simplify your palette

Colour Image Segmentation Technique for Screen Printing

Visualizing Multidimensional Data Through Time Stephen Few July 2005

GRAPHING DATA FOR DECISION-MAKING

INTRODUCTION IMAGE PROCESSING >INTRODUCTION & HUMAN VISION UTRECHT UNIVERSITY RONALD POPPE

Diverging Color Maps for Scientific Visualization (Expanded)

Diagrams and Graphs of Statistical Data

CS 325 Computer Graphics

Tutorial 3: Graphics and Exploratory Data Analysis in R Jason Pienaar and Tom Miller

Central Innovation Programme for SMEs. Boosting innovation

Selected Facts and Figures about Long-Term Care Insurance

Colour Science Typography Frontend Dev

R Graphics Cookbook. Chang O'REILLY. Winston. Tokyo. Beijing Cambridge. Farnham Koln Sebastopol

The Which Blair Project : A Quick Visual Method for Evaluating Perceptual Color Maps

Part 2: Data Visualization How to communicate complex ideas with simple, efficient and accurate data graphics

Adding Animation With Cinema 4D XL

Filters for Black & White Photography

Seeing in black and white

Visualization Quick Guide

Toward a Perceptual Science of Multidimensional Data Visualization: Bertin and Beyond

Calibration Best Practices

Visa Brand Mark. Protect the Cornerstone of the Visa Brand

At the core of this relationship there are the three primary pigment colours RED, YELLOW and BLUE, which cannot be mixed from other colour elements.

POPULAR DATA VISUALIZATION INTUITIVE AND UNINTUITIVE

Important Notes Color

ColourSpace Conversions

Assessment. Presenter: Yupu Zhang, Guoliang Jin, Tuo Wang Computer Vision 2008 Fall

Graphic Design Promotion (63) Scoring Rubric/Rating Sheet

Visualization methods for patent data

Color Management Terms

ELEMENTS OF ART & PRINCIPLES OF DESIGN

Data Visualization. BUS 230: Business and Economic Research and Communication

Diverging Color Maps for Scientific Visualization

What is Visualization? Information Visualization An Overview. Information Visualization. Definitions

Transcription:

Escaping RGBland: Selecting Colors for Statistical Graphics Achim Zeileis, Kurt Hornik, Paul Murrell http://statmath.wu.ac.at/~zeileis/

Overview Motivation Color in statistical graphics Challenges Illustrations Color vision and color spaces Color palettes Qualitative Sequential Diverging Color blindness Software

Color in statistical graphics Color: Integral element in graphical displays. Easily available in statistical software. Omnipresent in (electronic) publications: Technical reports, electronic journal articles, presentation slides. Problem: Little guidance about how to choose appropriate colors for a particular visualization task. Question: What are useful color palettes for coding qualitative and quantitative variables?

Challenges Colors should not be unappealing: Basic principles: Colors should be intuitive, avoid large areas of saturated colors. Control of perceptual properties: Hue, brightness, colorfulness. Employ a color model or color space. RGB (Red-Green-Blue): Corresponds to generation of colors on computer, unintuitive for humans. HSV (Hue-Saturation-Value): Simple transformation of RGB, easily available. But: Maps poorly to perceptual properties, encourages use of highly saturated colors. HCL (Hue-Chroma-Luminance): Transformation of CIELUV space, mitigates problems above.

Challenges Colors in a statistical graphic should cooperate with each other: Purpose: Distinguish different elements of a statistical graphic depending on the levels of some variable. Palette of colors needed. Natural idea: Vary one or more perceptual properties. In perceptual color space: Traverse paths along dimensions. Problem: Often based on HSV space with rather poor results. Solution: HCL. Not only location but also motion is intuitive. Colors should work everywhere: Ideally: Screen, projector, (grayscale) printer, color-blind viewers. Cannot always (but often) be attained.

Illustrations Examples: Heatmap of bivariate kernel density estimate for Old Faithful geyser eruptions data. Map of Nigeria shaded by posterior mode estimates for childhood mortality. Pie chart of seats in the German parliament Bundestag, 2005. Mosaic display of votes for the German Bundestag, 2005. Model-based mosaic display for treatment of arthritis. Scatter plot with three clusters (and many points). Colors: Palettes are constructed based on HSV space, especially by varying hue.

Illustrations: Old Faithful heatmap

Illustrations: Nigeria childhood mortality map

Illustrations: Bundestag seats pie chart SPD CDU/CSU Gruene Linke FDP

Illustrations: Bundestag votes mosaic Schleswig Holstein Hamburg Niedersachsen Bremen CDU/CSU FDP SPD Gr Li Nordrhein Westfalen Hessen Rheinland Pfalz Bayern Baden Wuerttemberg Saarland Mecklenburg Vorpommern Brandenburg Sachsen Anhalt Berlin Sachsen Thueringen

Illustrations: Arthritis treatment mosaic Placebo Treatment Treated Pearson residuals: 1.87 1.64 Improvement Marked Some None 1.24 0.00 1.24 1.72 p value = 0.0096

Illustrations: Scatter plot with clusters

Illustrations Problems: Flashy colors: Good for drawing attention to a plot but hard to look at for a longer time. Large areas of saturated colors: Can produce distracting after-image effects. Unbalanced colors: Light and dark colors are mixed; or positive and negative colors are difficult to compare. Quantitative variables are often difficult to decode.

Color vision and color spaces Human color vision is hypothesized to have evolved in three stages: 1 Light/dark (monochrome only). 2 Yellow/blue (associated with warm/cold colors). 3 Green/red (associated with ripeness of fruit). Yellow Green Red Blue

Color vision and color spaces Due to these three color axes, colors are typically described as locations in a 3-dimensional space, often by mixing three primary colors, e.g., RGB or CIEXYZ. Physiological axes do not correspond to natural perception of color but rather to polar coordinates in the color plane: Hue (dominant wavelength). Chroma (colorfulness, intensity of color as compared to gray). Luminance (brightness, amount of gray). Perceptually based color spaces try to capture these three axes of the human perceptual system, e.g., HSV or HCL.

Color space: HSV HSV space: Standard transformation of RGB space implemented in most computer packages. Specification: Triplet (H, S, V) with H = 0,..., 360 and S, V = 0,..., 100, often all transformed to unit interval (e.g., in R). Shape: Cone (or transformed to cylinder). Problem: Dimensions are confounded, hence not really perceptually based. In R: hsv().

Color space: HSV

Color space: HSV

Color space: HSV

Color space: HCL HCL space: Perceptually based color space, polar coordinates in CIELUV space. Specification: Triplet (H, C, L) with H = 0,..., 360 and C, L = 0,..., 100. Shape: Distorted double cone. Problem: Care is needed when traversing along the axes due to distorted shape. In R: hcl().

Color space: HCL

Color space: HCL

Color space: HCL

Color palettes: Qualitative Goal: Code qualitative information. Solution: Use different hues for different categories. Keep chroma and luminance fixed, e.g., (H, 50, 70) Remark: The admissible hues (within HCL space) depend on the values of chroma and luminance chosen.

Color palettes: Qualitative

Color palettes: Qualitative Hues can be chosen from different subsets of [0, 360] to create different moods or as metaphors for the categories they code (Ihaka, 2003). dynamic [30, 300] harmonic [60, 240] cold [270, 150] warm [90, 30]

Color palettes: Qualitative SPD CDU/CSU Gruene Linke FDP

Color palettes: Qualitative SPD CDU/CSU Gruene Linke FDP

Color palettes: Qualitative Schleswig Holstein Hamburg Niedersachsen Bremen CDU/CSU FDP SPD Gr Li Nordrhein Westfalen Hessen Rheinland Pfalz Bayern Baden Wuerttemberg Saarland Mecklenburg Vorpommern Brandenburg Sachsen Anhalt Berlin Sachsen Thueringen

Color palettes: Qualitative Schleswig Holstein Hamburg Niedersachsen Bremen CDU/CSU FDP SPD Gr Li Nordrhein Westfalen Hessen Rheinland Pfalz Bayern Baden Wuerttemberg Saarland Mecklenburg Vorpommern Brandenburg Sachsen Anhalt Berlin Sachsen Thueringen

Color palettes: Qualitative

Color palettes: Qualitative

Color palettes: Sequential Goal: Code quantitative information. Intensity/interestingness i ranges in [0, 1], where 0 is uninteresting, 1 is interesting. Solution: Code i by increasing amount of gray (luminance), no color used, e.g., (H, 0, 90 i 60) The hue H does not matter, chroma is set to 0 (no color), luminance ranges in [30, 90], avoiding the extreme colors black and white. Modification: In addition, code i by colorfulness (chroma). Thus, more formally: (H, 0 + i C max, L max i (L max L min ) for a fixed hue H.

Color palettes: Sequential

Color palettes: Sequential Modification: To increase the contrast within the palette even further, simultaneously vary the hue as well: (H 2 i (H 1 H 2 ), C max i p1 (C max C min ), L max i p2 (L max L min )). To make the change in hue visible, the chroma needs to increase rather quickly for low values of i and then only slowly for higher values of i. A convenient transformation for achieving this is to use i p instead of i with different powers for chroma and luminance.

Color palettes: Sequential

Color palettes: Sequential

Color palettes: Sequential

Color palettes: Sequential

Color palettes: Sequential

Color palettes: Diverging Goal: Code quantitative information. Intensity/interestingness i ranges in [ 1, 1], where 0 is uninteresting, ±1 is interesting. Solution: Combine sequential palettes with different hues. Remark: To achieve both large chroma and/or large luminance contrasts, use hues with similar chroma/luminance plane, e.g., H = 0 (red) and H = 260 (blue).

Color palettes: Diverging

Color palettes: Diverging

Color palettes: Diverging

Color palettes: Diverging

Color palettes: Diverging Placebo Treatment Treated Pearson residuals: 1.87 1.64 Improvement Marked Some None 1.24 0.00 1.24 1.72 p value = 0.0096

Color palettes: Diverging Placebo Treatment Treated Pearson residuals: 1.87 1.64 Improvement Marked Some None 1.24 0.00 1.24 1.72 p value = 0.0096

Color blindness Problem: A few percent of humans (particularly males) have deficiencies in their color vision, typically referred to as color blindness. Specifically: The most common forms of color blindness are different types of red-green color blindness: deuteranopia (lack of green-sensitive pigment), protanopia (lack of red-sensitive pigment). Solution: Construct suitable HCL colors. Use large large luminance contrasts (visible even for monochromats). Use chroma contrasts on the yellow-blue axis (visible for dichromats). Check colors by emulating dichromatic vision, e.g., utilizing dichromat (Lumley 2006).

Color blindness

Color blindness

Color blindness

Color blindness

Color blindness

Color blindness

Color blindness

Color blindness

Software Given implementation of HCL colors, palette formulas are straightforward to implement. Otherwise, HCL coordinates typically need to be converted to RGB coordinates for display. Formulas are available, e.g., in Wikipedia or implemented in Ross Ihaka s C code underlying colorspace. The interactive online tool ColorBrewer.org provides many fixed palettes with similar properties. Very easy to use.

Software: R Color spaces: Base system: rgb(), hsv(), hcl(),... Package colorspace: RGB(), HSV(), polarluv(),... Color palettes: Base system, HSV-based: rainbow(), heat.colors(),... Package colorspace, HCL-based: rainbow_hcl(), heat_hcl(), sequential_hcl(), diverge_hcl(),... Examples:?rainbow_hcl and vignette("hcl-colors", package = "colorspace"). Further useful packages: RColorBrewer (fixed palettes from ColorBrewer.org), ggplot2, plotrix,...

Summary Use color with care, do not overestimate power of color. Avoid large areas of flashy, highly saturated colors. Employ monotonic luminance scale for numerical data. HCL space allows for intuitive variation of perceptual properties. Formulas for palettes are easy to implement in new software. Convenience functions (similar to base R tools) are readily provided in colorspace.

References Zeileis A, Hornik K, Murrell P (2009). Escaping RGBland: Selecting Colors for Statistical Graphics. Computational Statistics & Data Analysis, 53, 3259 3270. doi:10.1016/j.csda.2008.11.033. Zeileis A, Meyer D, Hornik K (2007). Residual-Based Shadings for Visualizing (Conditional) Independence. Journal of Computational and Graphical Statistics, 16(3), 507 525. doi:10.1198/106186007x237856. Lumley T (2006). Color Coding and Color Blindness in Statistical Graphics. ASA Statistical Computing & Graphics Newsletter, 17(2), 4 7. URL http://www. amstat-online.org/sections/graphics/newsletter/volumes/v172.pdf. Ihaka R (2003). Colour for Presentation Graphics. In K Hornik, F Leisch, A Zeileis (eds.), Proceedings of the 3rd International Workshop on Distributed Statistical Computing, Vienna, Austria, ISSN 1609-395X, URL http://www.ci.tuwien.ac.at/conferences/dsc-2003/proceedings/.