Visual Perception and D3 Foundations

CS-GY 6313 - Fall 2026

Claudio Silva

NYU Tandon School of Engineering

2026-09-25

Visual Perception and D3 Foundations

Visual Perception

  • Pre-attentive processing
  • Gestalt principles
  • Perceptual accuracy
  • Channel effectiveness

D3 Foundations (in the lab, with Ryan)

  • Selections and data binding
  • Scales and axes
  • Your first bar chart

Quick Recap

Design Principles

  • Expressiveness: A set of facts is expressible in a visual language if the sentences in the language express all the facts in the set of data, and only the facts in the data
  • Effectiveness: A visualization is more effective than another visualization if the information conveyed by one visualization is more readily perceived than the information in the other visualization

Design Principles Translated

  • Expressiveness: Tell the truth and nothing but the truth (don’t lie, and don’t lie by omission)
  • Effectiveness: Use encodings that people decode better (where better == faster and/or more accurate)

Effectiveness measures

  • Accuracy: Estimating magnitudes
  • Discriminability: number of values one can distinguish
  • Saliency: attracting attention
  • Separability: interference between channels
  • Grouping: pattern formation

Perception for Design

The Brain and Vision

“Visual thinking consists of a series of acts of attention, driving eye movements, and tuning our pattern finding circuits” - Colin Ware

The Visual Brain

The Act of Perception

Perception runs bottom-up and top-down at the same time

Bottom-up Processing

  • Information is filtered into patterns through successive stages:
    1. Optic nerve to V1 cortex
    2. Texture and colour aggregate into patterns
    3. Objects assembled in visual working memory
  • The face-vase: one input, two objects, never both at once

Top-Down Processing

  • Every bottom-up stage has a matching top-down process
  • Ware calls it “attention”
  • We get the information we need, when we need it
  • Circles are fixations, lines are saccades: most of the scene is never visited

Implications for Design

  • “Just-in-time visual queries” (Ware)
  • “The brain operates as a set of nested loops. Outer loops deal with generality while inner loops process detail.” (Ware)
  • Each saccade asks the display a question and expects the answer in one fixation

Low-Level Feature Analysis

The visual cortex has specialized cells for edges, orientations and motion (Hubel & Wiesel, Nobel 1981)

What and Where Pathways

  • What pathway: Object identification
  • Where pathway: Object location and eye movement

Accuracy

Psychophysics: vary a stimulus, ask how strong it feels (Fechner, 1860)

Power Law

Graphical Perception

Cleveland & McGill Experiment

Task: judge what percentage the smaller marked value is of the larger

Cleveland & McGill Results

Position > Length and Angle > Area

Other Cleveland & McGill Experiment: Angle vs. Position

Replication: Heer & Bostock (2010)

Channel Effectiveness Ranking

Accuracy Guidelines

  • Prioritize high-rank channels (with reason)
  • Do not expect precise judgments from low-rank channels
  • Position > Length > Angle > Area > Volume > Color

Application:

  • Use position for most important comparisons
  • Use color for categorical distinctions
  • Avoid 3D for quantitative data

Relative vs. Absolute Judgments

Humans are better at relative comparisons than absolute judgments

Discriminability

  • Discriminability: How many values can be distinguished within a channel
  • It depends on:
    • Channel properties
    • Spatial arrangement
    • Size
    • Cardinality

Discriminability

  • Discriminability: How many values can be distinguished within a channel
  • It depends on:
    • Channel properties
    • Spatial arrangement
    • Size
    • Cardinality

Discriminability

How many distinct values can be distinguished within a channel?

Depends on:

  • Channel properties
  • Spatial arrangement
  • Size (resolution)
  • Cardinality

Practical limits:

  • Line width: ~3 levels
  • Color hues: 5-6 maximum
  • Symbol shapes: 5-6 maximum

Discriminability Guidelines

Do not overestimate the number of values viewers can discriminate

Strategies to overcome this problem

  • How do we solve the problem of encoding a categorial attribute with high cardinality?
    • Grouping
    • Filtering
    • Faceting

Grouping

Grouping: merge categories semantically to reduce the number of classes to distinguish

Filtering

Filtering: keep only the classes the question is about

Faceting

Faceting: move the category from colour to position, one panel per class

Pre-attentive Processing: Popout

For some features, search time does not depend on the number of distractors (Treisman)

Pre-attentive Processing: Popout

Pre-attentive vs. Attentive

Attentive

Serial search

Multiple Channels Usually Not Pre-attentive

  • Red squares, blue circles, and one red circle
  • Each feature alone pops out; the conjunction does not
  • Encode the target in a single channel, not the intersection of two

Application to visualization design

Application to visualization design

Pre-attentive Processing

  • Tasks performed in less than 200-250 milliseconds
  • Faster than eye movement initiation
  • Suggests processing by the parallel low-level visual system
  • Same display as before: pop-out does not habituate

Grouping: The Gestalt Principles

Interactive demo

  • Visualization is a two-way street:
    • We (the vis designer) bring something to the table
    • The human (end user) brings their prior experience
  • Design should take prior experience into account
  • What is prior experience? Gestalt laws

Gestalt: Closure

  • We complete incomplete shapes: there is no triangle here
  • Implications:
    • Visualizations can mislead unintentionally
    • Sparse marks can be enough to convey a trend

Gestalt: Similarity

Elements with the same visual properties are perceived as grouped

Gestalt: Proximity

Elements that are spatially close are perceived as grouped

Gestalt: Enclosure

Explicit visual encoding of enclosure depicts grouping

Gestalt: Connection

Objects connected together are perceived as a group

Connection Examples

Just Noticeable Difference (JND)

  • The amount something must change to be noticed at least 50% of the time
  • Weber’s law: the JND is a constant fraction of the stimulus
  • Stevens’s power law is the cumulative version (Wikipedia)
  • A difference below the JND is not encoded, whatever the data says

Channel Separability

  • Amount of interference between channels
  • Colour and shape are separable: attend to one, ignore the other
  • Width and height of a rectangle are integral: they fuse into size and shape
  • Separable channels can carry two variables; integral ones cannot

Perception Principles in Practice

Design Guidelines:

  1. Use position for primary comparisons
  2. Limit color categories to 5-6
  3. Leverage pre-attentive features for highlighting
  4. Apply Gestalt principles for grouping
  5. Consider colorblindness (~8% of males)

Common Mistakes:

  • Too many colors in categorical data
  • 3D charts for 2D data
  • Relying on area/volume for precise values
  • Ignoring perceptual limits

Lab Preview: Your First D3 Visualization

Today’s Lab Activities:

  1. Set up D3 development environment
  2. Create basic selections and data binding
  3. Build a simple bar chart
  4. Add scales and axes
  5. Implement basic interactions (hover)

Summary

Visual Perception:

  • Pre-attentive features enable rapid visual search
  • Gestalt principles guide grouping and organization
  • Channel effectiveness varies by task
  • Humans excel at relative, not absolute judgments

This afternoon (lab):

  • D3 selections, data binding, scales and axes
  • Build the bar chart; the encoding choices are today’s ranking applied

Next Week (Oct 2):

Color and D3 Scales - color theory, perceptual color spaces, colorblindness, palette design, D3 scales

Exercise 4 (perception-based design decisions + D3 implementation) is due Oct 1

For Next Week (Oct 2 - Color and D3 Scales)

Required:

Due:

  • Exercise 4 - Perception-based design decisions + D3 implementation (due Oct 1)

Optional: