Key Takeaways: Visualization Design — Principles, Accessibility, Ethics, and Common Mistakes
This is your reference card for Chapter 18 — the chapter where you learned to evaluate whether a visualization is effective, accessible, and honest. Keep this nearby whenever you create or critique a chart.
The Core Framework
Every visualization decision falls into one of three categories:
- Perception — Does the human visual system process this chart effectively?
- Accessibility — Can everyone in the audience understand this chart?
- Ethics — Does this chart represent the data honestly?
Perceptual Principles
Pre-Attentive Features (Processed in < 250ms)
| Feature | Use Case |
|---|---|
| Color hue | Differentiate categories |
| Color intensity | Show magnitude |
| Size | Highlight importance |
| Orientation | Show direction or anomaly |
| Shape | Differentiate categories (second channel) |
| Position | Show outliers or breakpoints |
Rule: To highlight a data point, encode it with at least one pre-attentive feature that differs from the surrounding data.
Gestalt Principles
| Principle | Chart Application |
|---|---|
| Proximity | Grouped bars feel like a unit |
| Similarity | Same-colored dots form a perceptual group |
| Continuity | Line charts convey trends through line-following |
| Enclosure | Facet panel borders create visual units |
| Connection | Lines between points imply continuity |
Cleveland-McGill Accuracy Hierarchy
- Position on a common scale (scatter plot, dot plot)
- Length (bar chart)
- Angle (pie chart)
- Area (bubble chart)
- Color saturation (heatmap, choropleth)
Rule: Use the most accurate encoding available for your most important comparison.
Data-Ink Ratio
Maximize: ink used to display data / total ink used
Common Chartjunk to Remove: - 3D effects on 2D charts - Gradient fills that encode nothing - Background images or textures - Excessive or heavy gridlines - Decorative borders and shadows - Redundant legends (single-group charts) - Different colors for bars in a single-variable bar chart
The Squint Test: Squint at your chart. If you cannot identify the main message, simplify.
Color Palette Guide
By Data Type
| Data Type | Palette Type | Examples |
|---|---|---|
| Ordered, one direction | Sequential | "Blues", "YlOrRd", "viridis" |
| Ordered, meaningful center | Diverging | "coolwarm", "RdBu", "PiYG" |
| Unordered categories | Qualitative | "Set2", "colorblind", "tab10" |
Palette Rules
- Maximum 7-10 colors for categorical data
- Never use "rainbow"/"jet" for continuous data — use
"viridis"or"cividis" - Use
"colorblind"palette as your default for categorical data - Center diverging palettes at the meaningful midpoint (
center=0in seaborn)
Accessibility Checklist
Color Vision Deficiency (~8% of men)
- [ ] Never use color as the only encoding for critical information
- [ ] Use colorblind-safe palettes (
"colorblind","viridis", Okabe-Ito) - [ ] Add a second encoding: shape, pattern, size, or direct label
- [ ] Test with a color vision deficiency simulator (or convert to grayscale)
Low Vision and Readability
- [ ] Text contrast ratio at least 4.5:1 against background (WCAG AA)
- [ ] Font size at least 10pt for labels, 12pt for titles
- [ ] Line width at least 1.5pt for data lines
- [ ] No light gray text on white backgrounds
Screen Readers
- [ ] Alt text for every chart: chart type + what it shows + key finding
- [ ] Data table provided alongside visual charts
- [ ] Semantic headings for navigation (H2 for chart titles)
Alt Text Template
"[Chart type] of [what it shows]. [Key finding with specific values]. [Source and date if relevant]."
Example: "Bar chart of vaccination coverage by WHO region in 2023. EURO leads at 93%, AFRO trails at 72%. Source: WHO."
Ethics: The Forensic Checklist
When evaluating any chart (yours or someone else's), ask:
| Question | What to Look For |
|---|---|
| Does the y-axis start at zero? | Bar charts must start at zero. Line/scatter may use relevant ranges. |
| What time range is shown? | Cherry-picked windows hide unfavorable periods. |
| Are there dual y-axes? | Scales can be manipulated to create false correlations. |
| Is area proportional to value? | Diameter-proportional circles inflate differences by squaring. |
| What context is missing? | Baselines, denominators, sample sizes, comparisons, uncertainty. |
Common Misleading Techniques
| Technique | How It Deceives | Honest Alternative |
|---|---|---|
| Truncated y-axis (bars) | Exaggerates small differences | Zero-based bars or dot plot |
| Cherry-picked time range | Hides unfavorable context | Full range with subset highlighted |
| Dual y-axes | Creates false visual correlation | Separate panels or normalized comparison |
| Area distortion | Inflates perceived size differences | Area-proportional encoding or bar chart |
| Missing denominators | Raw counts hide rate changes | Show rates or per-capita figures |
The Redesign Workflow
- Identify the message — What question should this chart answer?
- Audit the encodings — Is each visual element the best choice for its variable?
- Check accessibility — Colorblind-safe? High contrast? Alt text?
- Check honesty — Zero-based bars? Full time range? Fair scales?
- Remove chartjunk — Can anything be removed without losing information?
- Add annotations — Title with finding, axis labels with units, key callouts, source.
Annotation Hierarchy
| Priority | Element | Example |
|---|---|---|
| 1 (Required) | Title + axis labels | "Coverage by Region" / "Coverage (%)" |
| 2 (Strongly recommended) | Key finding in title/subtitle | "Africa trails Europe by 21 points" |
| 3 (Recommended) | Reference lines | Horizontal line at 90% threshold |
| 4 (When helpful) | Data labels | "93%" on a specific bar |
| 5 (Always) | Source attribution | "Source: WHO, 2023" |
Terms to Remember
| Term | Definition |
|---|---|
| data-ink ratio | Proportion of a chart's visual elements that represent data |
| color blindness | Reduced ability to distinguish certain colors, especially red and green |
| accessibility | Designing visualizations usable by people with disabilities |
| alt text | Text description of a chart for screen reader users |
| annotation | Label, callout, or reference line that adds context to a chart |
| aspect ratio | Width-to-height ratio of a chart; affects perceived trend steepness |
| truncated axis | Y-axis that starts above zero, exaggerating differences in bar charts |
| cherry-picking | Selecting data subsets that support a desired conclusion |
| dual axis | Chart with two different y-scales, enabling false visual correlation |
| misleading visualization | Chart that creates a false impression using accurate data |
| Gestalt principles | Perceptual rules governing how the brain groups visual elements |
| pre-attentive processing | Visual features processed before conscious thought (< 250ms) |
| color palette | Curated set of colors for data visualization |
| sequential colormap | Palette mapping ordered data as a light-to-dark gradient |
| diverging colormap | Palette mapping data around a center point using two opposing hues |
What You Should Be Able to Do Now
- [ ] Explain how pre-attentive processing affects chart design
- [ ] Apply Gestalt principles to guide visual grouping
- [ ] Evaluate a chart's data-ink ratio and identify chartjunk
- [ ] Choose the correct palette type (sequential, diverging, qualitative)
- [ ] Avoid the rainbow colormap and explain why
- [ ] Design charts with colorblind-safe palettes and redundant encodings
- [ ] Write descriptive alt text for any chart
- [ ] Detect truncated axes, cherry-picking, dual-axis manipulation, and area distortion
- [ ] Apply the redesign workflow to improve a flawed chart
- [ ] Use the design checklist before sharing any visualization
- [ ] Annotate charts with titles that state findings, clear axis labels, and source attribution
- [ ] Explain why bar charts must start at zero but line charts do not need to
You have now completed Part III — Visualization. You have the tools (matplotlib, seaborn, plotly) and the judgment (perception, accessibility, ethics) to create visualizations that are effective, inclusive, and honest. In Part IV, you will bring these skills to statistics and machine learning, where visualization is your primary tool for understanding models and communicating results.