cassionData Analysis

Back to the lessonLesson 5 of 8The page it must survive

Print it in grey and see what is left

The same deck as the downloads, rendered as a page. Start the slideshow to present it full screen — arrow keys or a click advance one slide, Escape leaves.

Slides · PDFSlides · PowerPoint

  1. Slide 1 / 25

    What this lesson covers

    • The four displays a chart has to survive
    • The greyscale test, which takes ten seconds
    • Colour vision deficiency
    • Type, lines and the size the chart is actually read at
    • Everything that can be deleted
    • Alt text, which is a caption doing a second job
    • Report it whole
    • What comes next
    Speaker notes
    A chart that works on your screen has been tested on the one display it will never be read on. The handout is greyscale, the projector washes out mid-tones, the room is lit, and about one man in twelve cannot separate your red from your green.
  2. Slide 2 / 25

    The four displays a chart has to survive

    DisplayWhat it doesWhat fails first
    A laser printerRemoves all hueTwo series distinguished only by colour
    A projector in a lit roomCrushes mid-tones, lifts blacksLight greys, thin lines, subtle shading
    A phone on a metered connectionShrinks everythingType below 9 pt, dense axis labels
    A colour-blind readerMerges red and greenThe signal palette, and any red/green pair
    Speaker notes
    A programme chart is authored once and read on displays the author never sees.
  3. Slide 3 / 25

    The four displays a chart has to survive

    • Every one of those is the normal case in this sector — not an accessibility edge case
    Speaker notes
    Every one of those is the normal case in this sector, not an accessibility edge case. The handout is photocopied, the projector is old, the reader is on a phone in a field office, and the room has a window.
  4. Slide 4 / 25

    The greyscale test, which takes ten seconds — In Python

    import matplotlib.pyplot as plt
    
    fig.savefig("chart.png", dpi=150)
    grey = plt.imread("chart.png").mean(axis=2)     # crude luminance
    plt.imsave("chart-grey.png", grey, cmap="gray")
  5. Slide 5 / 25

    The greyscale test, which takes ten seconds — In R

    # ggsave(), then open it in any viewer and desaturate. Or just print it.
  6. Slide 6 / 25

    The greyscale test, which takes ten seconds

    • Run it on every chart before it ships — If two series became one, the chart was encoding a distinction in hue alone
    • The fix is never "pick better colours" — It is to add a second channel:
    Speaker notes
    Run it on every chart before it ships. If two series became one, the chart was encoding a distinction in hue alone. The fix is never "pick better colours". It is to add a second channel:
  7. Slide 7 / 25

    The greyscale test, which takes ten seconds

    Distinguish byHow
    Two linesDirect labels at the line ends, plus solid and dashed
    Bars, one emphasisedLightness contrast, not hue contrast
    CategoriesSmall multiples, so nothing needs distinguishing
    Points in a scatterShape as well as colour
  8. Slide 8 / 25

    The greyscale test, which takes ten seconds

    • Lightness survives greyscale by definition — The platform's figures use a dark spruce against a mid slate, which are…
    Speaker notes
    Lightness survives greyscale by definition. The platform's figures use a dark spruce against a mid slate, which are two distinguishable greys before they are two colours — and that is why the emphasis in every figure on this site still reads in a photocopy.
  9. Slide 9 / 25

    Colour vision deficiency

    • The signal palette is the problem case and it is unavoidable — because green, amber and red are the sector's convention…
    Speaker notes
    About 8% of men and 0.5% of women of northern European descent have some form, and the commonest kinds merge red with green. The signal palette is the problem case and it is unavoidable, because green, amber and red are the sector's convention and cannot simply be replaced.
  10. Slide 10 / 25

    Colour vision deficiency — In Python

    SIGNAL = {"normal": "#2f8f5b", "moderate": "#d9a02b", "severe": "#c0442f"}
  11. Slide 11 / 25

    Colour vision deficiency — In R

    # Keep the hues. Add a second channel so the hue is not load-bearing.
  12. Slide 12 / 25

    Colour vision deficiency

    • Three ways to keep the convention and still be readable
    • Order the categories — Normal, moderate, severe in that order means position carries the severity even when hue does not
    • Label directly — The word "severe" on the bar costs nothing and removes the dependence entirely
    • Vary the lightness deliberately — The three signal colours on this platform are not equally light: the green is darker…
    Speaker notes
    Three ways to keep the convention and still be readable. Order the categories. Normal, moderate, severe in that order means position carries the severity even when hue does not. Label directly. The word "severe" on the bar costs nothing and removes the dependence entirely. Vary the lightness deliberately. The three signal colours on this platform are not equally light: the green is darker than the amber, so they separate in greyscale as well as in hue. Check that; a palette picked for hue alone often has two colours at identical lightness, which merge into one grey.
  13. Slide 13 / 25

    Type, lines and the size the chart is actually read at — In Python

    plt.rcParams.update({
        "font.size": 10,          # 9 pt is the floor for a printed figure
        "axes.labelsize": 10,
        "axes.titlesize": 11,
        "xtick.labelsize": 9,
        "lines.linewidth": 1.6,   # 1 pt disappears on a projector
    })
    fig.set_size_inches(6.5, 4)   # the width of a text column, not of a monitor
  14. Slide 14 / 25

    Type, lines and the size the chart is actually read at — In R

    theme_set(theme_minimal(base_size = 11))
  15. Slide 15 / 25

    Type, lines and the size the chart is actually read at

    • Author at the size it will be printed — A chart designed at 12 inches wide and dropped into a 6.5-inch column has…
    • 9 pt is the floor for print and 18 pt for a projected slide — The lesson decks this platform generates are 1280×720;…
    • Thin lines and light greys are the first casualties of a projector — Use 1.5 pt or heavier, and do not rely on a grey…
    Speaker notes
    Author at the size it will be printed. A chart designed at 12 inches wide and dropped into a 6.5-inch column has half-size type, and the fix is not to scale the image — it is to redraw at the target width. 9 pt is the floor for print and 18 pt for a projected slide. The lesson decks this platform generates are 1280×720; anything below about 18 pt at that size is not read from the back of a room. Thin lines and light greys are the first casualties of a projector. Use 1.5 pt or heavier, and do not rely on a grey lighter than about 40% for anything that carries information.
  16. Slide 16 / 25

    Everything that can be deleted

    DeleteBecause
    The legend, for two seriesDirect labels are read in place
    Gridlines, most of themFour is enough; twelve is a texture
    The chart border and top/right spinesThey carry nothing
    Redundant axis units on every tick"%" on the axis label, not on each number
    The title, when the caption says itTwo headings compete
    Decimal places42.9% not 42.94%; the interval is wider than the decimal
    Speaker notes
    The strongest accessibility measure is having less on the chart.
  17. Slide 17 / 25

    Everything that can be deleted — In Python

    plt.rcParams.update({"axes.spines.top": False, "axes.spines.right": False})
    ax.grid(axis="x", alpha=0.3)
    ax.set_axisbelow(True)              # gridlines behind the bars
  18. Slide 18 / 25

    Everything that can be deleted — In R

    theme(panel.grid.minor = element_blank(), panel.border = element_blank())
  19. Slide 19 / 25

    Everything that can be deleted

    • Gridlines go behind the data — A gridline drawn over a bar reads as a division in the bar, which is a mark that means…
    Speaker notes
    Gridlines go behind the data. A gridline drawn over a bar reads as a division in the bar, which is a mark that means nothing.
  20. Slide 20 / 25

    Alt text, which is a caption doing a second job — Example

    ![Global acute malnutrition by commune with 95% confidence intervals. The three
    highlighted communes are the only ones whose interval clears the district
    median.](/figures/muac-gam-by-commune.en.svg)
    Speaker notes
    Every figure on this platform carries a caption long enough to state its finding, and that caption is what a screen reader announces.
  21. Slide 21 / 25

    Alt text, which is a caption doing a second job

    • "Chart of GAM by commune" describes the file, not the finding — A reader who cannot see the chart gets nothing from it
    • A caption that states the finding serves four readers at once — the screen-reader user, the reader of the printed…
    • This is why the platform requires it rather than recommending it — figures.test.ts fails a figure whose caption is…
    Speaker notes
    "Chart of GAM by commune" describes the file, not the finding. A reader who cannot see the chart gets nothing from it. A caption that states the finding serves four readers at once: the screen-reader user, the reader of the printed handout, the trainer working from the PowerPoint where the figure is a caption rather than a drawing, and the person skimming the report for the point. This is why the platform requires it rather than recommending it. figures.test.ts fails a figure whose caption is shorter than twenty characters, and the reason is not tidiness.
  22. Slide 22 / 25

    Report it whole — Example

    Figure accessibility conventions
    
      All figures are readable in greyscale: emphasis is carried by lightness
      contrast rather than hue, and series are labelled directly rather than
      through a legend.
    
      Signal colours (green/amber/red) are used only where the categories are
      ordered by severity, so position carries the meaning independently of hue.
    
      Figures are drawn at the width they are printed. Minimum type size is 9 pt
      in the report and 18 pt on slides.
    
      Every figure carries a caption stating its finding, which is also its
      alternative text.
  23. Slide 23 / 25

    Report it whole

    • Four lines, and they are checkable by anyone with a printer — An accessibility statement that cannot be verified from…
    Speaker notes
    Four lines, and they are checkable by anyone with a printer. An accessibility statement that cannot be verified from the artefact is a claim rather than a convention.
  24. Slide 24 / 25

    What comes next

    • A figure is rarely read where it was written.
    Speaker notes
    A figure is rarely read where it was written. The next lesson is about the caption that has to survive being pasted into a situation report by someone who did not do the analysis.
  25. Slide 25 / 25

    Where this goes next

    Read the full lesson, with runnable code Back to the lesson