How to Make Good Charts

Susan Vanderplas

22 September, 2022

What do you see?

What do you see?

It’s not just an illusion - it’s a photo

Why Graphics Matter

Graphics are a form of external cognition that allow us to think about the data rather than the chart



Good graphics take advantage of how the brain works

  • preattentive processing

  • perceptual grouping

  • awareness of visual limitations

Example

Spot the Difference

Spot the Difference

Preattentive perception

  • Occurs automatically (no effort)

  • Color, shape, angle

  • Combinations of preattentive features require attention

    • Unless you double-encode
      (use different features for the same variable)



Using preattentive features reduces the amount of work your viewer has to expend to understand your chart

What do you see?

Gestalt Laws of Perception

Gestalt Laws in Data Visualization

  • Proximity

  • Similarity

Gestalt Laws in Data Visualization

Gestalt Laws in Data Visualization

  • Good continuation

Which one is different?

Which one is different?

Plot Annotations Matter!

  • Plot 12: 59.1%
  • Plot 5: 9.1%
  • Other plots: 31.7%

  • Plot 12: 9.7%
  • Plot 5: 29.0%
  • Plot 18: 32.3%
  • Other plots: 29.0%

Visual Limitations

  • Not all graphical representations are equally accurate

  • Optical illusions

  • Designing plots for disabilities

Accuracy of Graphical Judgements

  1. Position along a common scale (most accurate)
    • scatter plot
  2. Position along nonaligned scale
    • multiple scatter plots
  3. Length
    • bar chart
  4. Angle, Slope
    • pie chart
  5. Area
    • bubble chart
  6. Volume, Density, Color saturation
    • heatmap
  7. Color hue (least accurate)

Optical Illusions

Designing for Accessibility

  • Write good alt-text and ensure it’s included in your online work

  • Low visual acuity:

    • High contrast (bright/dark)
    • large font size
    • textures/patterns can be hard to make out
  • Colorblindness:

    • Safest: design for a black-and-white photocopier
    • Avoid rainbow gradients
    • If you need a 2-color gradient, use blue/purple - white - orange (safe for most types of colorblindness)
  • Other options:

    • ajrgodfrey/BrailleR - translate plots into text descriptions for screen readers
    • sonify - represent data using sound
    • gt - tables with metadata that is easy for screen readers

Questions?