Visual Perception

Visual objects

Information in graphics is encoded in visual attributes

  • Position

  • Size

  • Color

  • Angle

  • Area

  • Etc.

Comparisons, estimates of magnitude, and patterns are determined by the visual features

Encoding and decoding information

To use a graphic

  • Data is encoded into the graphic

  • A person views the graphic

  • The person decodes the visual elements to get information

We should try to make this last step as easy as possible, given the limitations of a human

Perception

Basic research on perception

  • Generally from cognitive (and related) areas

Applied research on perception

  • Often comes out of “human factors” areas

Bottom-up versus top-down perception

Bottom-up processing

  • Start with basic perceptual features (e.g., edges, color)

  • Use those to work up to shapes and patterns

  • Uninfluenced by expectations

  • Pre-attentive

Top-down processing

  • Driven by expectations, experiences, knowledge

  • Filters what we see through that

Bottom-up example

How many 8s?

11768583633938959279

Bottom-up example

How many 8s?

11768583633938959279

How many 8s?

11765363393959279

Bottom-up example

In the first set, you have to read and process the numbers

When the numbers are a different color, you notice the color before you can even tell that they’re 8s

Color is processed bottom-up (pre-attentionally)

Top-down example

What is this an image of?

Top-down example

It depends on the context

Top-down processing helps you decide whether it’s a letter or numbers

Gestalt

Type of top-down processing

We tend to see things that are

  • near one another

  • similar to one another

  • continuations of one another or connected to one another

  • in a common region

  • moving together

as being a distinct unit (even if they’re not)

Figure-ground

The figure is the thing you’re focusing on

The ground is the rest – think, “background”

Can lead to ambiguous or misleading graphics

Figure-ground in graphics

Modification by: https://twitter.com/PFedewa

Visual illusions

  • Muller Lyre illusion:

https://en.wikipedia.org/wiki/M%C3%BCller-Lyer_illusion

  • Ebbinghaus or Tichener illusion:

https://en.wikipedia.org/wiki/Ebbinghaus_illusion

  • Ponzo illusion:

https://en.wikipedia.org/wiki/Ponzo_illusion

All of these illusions exist because of top-down processing / heuristics / context

What are we good at?

We’ve seen a bunch of examples of what we’re bad at and how perception can go wrong

  • How can it go right?

  • What are we good at?

It turns out, quite a few things

Judging whether a line is straight or not

Q-Q plot: quantile-quantile plot

https://en.wikipedia.org/wiki/Q%E2%80%93Q_plot

Judging magnitude (sometimes)

Cleveland & McGill (1984) and Heer & Bostock (2010) had people judge magnitude based on different visual representations

From highest accuracy to lowest:

  • Position

  • Angle

  • Circular area

  • Rectangular area

Position = good

Area = bad

Effectiveness of different representations for comparisons

Munzner (2015) book: Visualization Analysis & Design

Conclusions

We are good at comparing position and length

  • We are bad at comparing areas, volumes, curvature

Use bar plot or dot plot (length and position, respectively)

  • Instead of circles or squares (areas, volumes)

Attributes that are processed bottom-up (pre-attentionally) are better

  • e.g., color for categorical variables

  • Color on a continuum is trickier

  • We’ll talk about color more in a second

Be aware of potential illusions

Color

Use of color

We use color in plots to

  • Highlight

  • Identify

  • Group

the elements in a graphic

Physiology of color perception

In the retina, there are 3 types of cones

Each cone is sensitive to a specific range of light wavelengths

  • red, green, or blue

There are also rods that help distinguish black and white

The color we perceive is determined by how much (relatively) each of the cones is activated by visible light

  • All red cones activated + no blue or green = we see red

  • Some blue, some green = we seen blue-green

There are many theories of exactly how we perceive color, but for our purposes, those details don’t really matter

  • Focus on how we define color for the purposes of graphics

Hue, saturation, lightness

Hue

  • What we would colloquially call the “color”

  • Red, blue, yellow, etc.

Saturation

  • Intensity of the color, from very little color (close to grey) to pure color

Lightness (or brightness)

  • Relative lightness or darkness

  • Black = no lightness

  • White = full lightness

Colors can vary along any or all of these dimensions

Categorical, sequential, diverging color schemes

Categorical: different hues, similar saturation

Sequential: similar hues of varying saturation

Diverging: two sequential schemes

From: http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf

Color vs black and white

What will your plot look like if it’s converted to black and white?

Categorical scheme has the same saturation for all colors

  • You can’t see any differences between colors

Sequential scheme varies saturation / intensity

  • You can still see all the differences

Diverging scheme varies saturation, but two ends are similar

  • You can still see which are in the middle and which are at the ends, but probably can’t tell the two ends from one another

Alpha

Adjusting the transparency / opacity (alpha) of colors can enhance their use

  • The points for different groups are different colors, but they may be obscured due to overplotting

  • Color plus reduced alpha lets you use color to distinguish groups while still being able to see all the points

Adjusting alpha may look similar to adjusting saturation

  • But stacked points with reduced alpha create high saturation areas

Color creation schemes

RGB: red, green, blue

  • Mixture of all = white

  • Computer monitors, film

  • FIU blue = (8, 30, 63)

CMYK: cyan, magenta, yellow (and black)

  • Mixture of all = black

  • Physical printing

  • FIU blue = (100, 87, 42, 52)

Hexadecimal

  • Web-based purposes (i.e., HTML)

  • FIU blue = #081E3F

Colorblindness

Genetic loss of one (or more) cone type

Most common is red-green color blindess

  • Red and green are indistinguishable

Choose a color scheme that doesn’t depend on people needing to distinguish between these colors

  • Remember to consider other properties of the color besides the color (hue), like saturation

Test your plot to see how it looks to a person who is color blind

Colors in ggplot2

We will have most of a lecture on the details of using color in ggplot

  • Changing the overall color theme for a plot

  • Changing the color of individual parts of a plot

Today, the focus is on color as a perceptual concept

Other design decisions

Wind frequency and direction

Radial bar chart is a good choice to see the prevailing wind direction

  • But not to be able to compare wind direction frequencies

What is the purpose of the graphic?

https://medium.com/nightingale/breaking-the-rules-bd212fecd045

Tips for making good graphics

In terms of small design decisions (based on cognition and perception)

  • High contrast color choices

  • Minimize distractions

  • Story of the graphic should jump out at you – squint at it (or take off your glasses)

https://www.dataquest.io/blog/design-tips-for-data-viz/

Some advice based on Tufte and Robbins

Data-to-ink ratio

  • Remove extra or decorative lines

Reduce the mental processing needed

  • Don’t make your viewer do more mental work than they need to

http://stat545.com/block015_graph-dos-donts.html

Does the Y axis need to start at 0?

  • Yes, for some types of charts

https://flowingdata.com/2015/08/31/bar-chart-baselines-start-at-zero/

  • Maybe

https://byjustinfox.com/2014/12/14/the-rise-of-the-y-axis-zero-fundamentalists/

(But some of the people quoted here say YES)

  • No, shut up about the y-axis.

https://www.youtube.com/watch?v=14VYnFhBKcY