About me

Data visualisation specialist, mainly using R, Python, and D3.


Background in statistics, operational research, and data science.


Author of several R packages (mainly for visualisation).


Co-author of Royal Statistical Society’s Best Practices for Data Visualisation guidance.

Grid of R package hex logos

Practical tips for making visual outputs more accessible


Myth: accessibility means compromising on aesthetics

Fact: accessibility means prioritising communication

Prioritising communication with everyone

Design visual outputs that can be understood by people with diverse abilities. This includes, but is not limited to, people who:

  • have visual impairments e.g. low vision or colour vision deficiency
  • use assistive techonologies e.g. screen readers or keyboard navigation
  • have cognitive or learning differences
  • use small screens
  • have poor internet connection

Let’s start with an example

I have data where the observations:

  • are continuous;
  • and are recorded over time;
  • for four different categories (A. B, C, D)

line chart icon

A default line chart

  • Don’t assume default settings are well-chosen

  • Not specific to ggplot2in R!

A line chart with four lines. Three of the lines are quite flat, the other is increasing. The lines are quite thin and coloured pink, green, purple, and blue, against a grey background. A legend is on the right hand side.

Is it visible enough?

  • Bigger font size
  • Thicker lines (including outlines)
  • Larger points

An updated version of the previous chart where the four lines are thicker and the text size is larger.

Colours

A desaturated, greyscale version of the previous chart image. The four lines are the same shade of grey and impossible to tell apart.

Choosing colours

A few good options:

An updated version of the line chart where the lines are now coloured blue, pink, green, and yellow.

Don’t rely on colour

  • Don’t rely on colour (esp. from the use of legend to distinguish categories)
  • Use direct labels e.g. category names at the end of each line
  • If colouring labels, colours don’t need to be an exact match

An updated version of the previous chart with text labels identifying each line added at the right hand side where the line ends. The legend has been removed.

Is that always enough?

  • What if the data were different?
  • Same type of data, but different values?
  • Would this chart type and styling still work?

The same styled chart as in the previous image but with different data. Although one line is still increasing, the lines are much more jagged and overlap more.

More than just colours and labels

  • Dashed lines can decrease perceived contrast (and have connotations of uncertainty)
  • Combine colours and symbols for category identification
  • How easy is it to read?

The same chart as in the previous image but with the different symbols added alogn each line, including circles, triangles, squares, and crosses. A legend is added at the bottom. It looks busy and quite ugly.

Change the chart type

  • Small multiples are a good alternative to spaghetti line charts
  • Four small plots, each highlighting one category
  • Remove clutter e.g. symbols on lines

Four small multiple line charts each with four lines. Three of the lines on each chart are shown in grey, and a different one is highlighted on each chart. The four highlighted lines are still different colours.

Do you actually need colour?

  • Don’t rely on colour.
  • Don’t over use colour. Highlight don’t decorate.
  • It’s easier to find one nice, accessible colour than it is to find four.

The same chart as before but with the four highlighted lines now the same colour of red across all four.

Further improvements

  • Chart text should be horizontal.
  • Choose a sensible font.
  • Use narrative titles to summarise.

The same chart as before but with a narrative title reading Agreement with statement D increased during 2024 added.

Before and after

A line chart with four lines. Three of the lines are very jagged, the other is increasing. The lines are quite thin and coloured pink, green, purple, and blue, against a grey background. A legend is on the right hand side. It's difficult to see the lines.

Four small multiple line charts each with four lines. Three of the lines on each chart are shown in grey, and a different one is highlighted in red on each chart. The increasing trend in one of the categories is easy to see. A narrative title reads Agreement with statement D increased during 2024.

Other considerations

  • Provide access to the data in the chart e.g. in the form of an accessible spreadsheet.

  • Provide alt text describing the chart. Read advice for Writing Alt Text for Data Visualization and consider output formats.

  • Use proper headings not just bold, bigger text for section titles.

  • Use interactivity carefully. Remember automated accessibility testing is a starting point.

A screenshot from the alt text which sats that is should include the chart type, type of data, the reason for including the chart, and a link to the data source

Practical questions to ask yourself

  • What are you trying to show?
  • Who are you trying to show it to?
  • What type of data do you have and what are the values in that data?
  • What is the clearest way to communicate what you’re trying to show to as much of your audience as you can?

If you’re designing things for humans, one of the best things you can do is go and talk to those humans about what they need.

Resources