Using color

Understanding Data Visualization

Richie Cotton

Data Evangelist at DataCamp

Colorspaces: Red-Green-Blue

shutterstock_1622648830.jpg

Understanding Data Visualization

Colorspaces: Cyan-Magenta-Yellow-blacK

shutterstock_505703968.jpg

Understanding Data Visualization

Choosing a plotting palette

Scatter plott of price vs area with a bad color palette

  • Usually, each color should stand out as much as other colors.
  • The perceptual distance from one color in the plot to the next should be constant.
Understanding Data Visualization

Colorspaces: Hue-Chroma-Luminance

Hue color swatch

Understanding Data Visualization

Colorspaces: Hue-Chroma-Luminance

Chrome and luminance color swatches

Understanding Data Visualization

Colorspaces: Hue-Chroma-Luminance

Hue, chrome, and luminance color swatches

Understanding Data Visualization

Three types of color scale: qualitative

Type Purpose What to vary
qualitative Distinguish unordered categories hue

Color swatch for qualitative data

Understanding Data Visualization

Qualitative palette example

A line plot of technology adoption by households in the United States. The x-axis runs from 1930 to 1970, and the y-axis runs from 0 to 100 percent. There are four lines representing adoption of automobiles, refrigerators, stoves, and vacuums.

Understanding Data Visualization

Three types of color scale: sequential

Type Purpose What to vary
sequential Show ordering chroma or luminance

Swatch for sequential color scale

Understanding Data Visualization

Sequential palette example

Bar plot of vegetable consumption by year

Understanding Data Visualization

Another sequential palette example

Scatter plot of length of schooling versus GNI and average life expectancy represented by color

1 Viridis color scale: https://bids.github.io/colormap
Understanding Data Visualization

Three types of color scale: diverging

Type Purpose What to vary
diverging Show above or below a midpoint chroma or luminance, with 2 hues

Color swatch for diverging data

Understanding Data Visualization

Green Tech in Malaysia survey dataset

question response n
Uses reliable and repairable Strongly Disagree 4
Uses reliable and repairable Disagree 8
Uses reliable and repairable Neutral 37
Uses reliable and repairable Agree 52
Uses reliable and repairable Strongly Agree 26
... ... ...
1 Islam et al. (2019) http://dx.doi.org/10.17632/wggvryfhsk.1
Understanding Data Visualization

Diverging palette example

Bar plot of likert survey

Understanding Data Visualization

Let's practice!

Understanding Data Visualization

Preparing Video For Download...