# Minimalist Tufte-inspired axis text with Scottish-New Zealand historical material

14 May 2016

## At a glance:

The breaks= argument in scales in the ggplot2 universe makes it simple to do minimalist Tufte-inspired scales where the text and tick marks show the actual data values rather than just regular intervals.

## Minimalist axes text and tick marks

One of the ideas in Edward Tufte’s The Visual Display of Quantitative Information was to minimise non-data-ink by dropping the regular text labelling values on axis guides, and instead using the axis guides to mark the values of the actual data. For those of you with the book in front of you, I’m thinking of the graphic Current Receipts of Government as a Percentage of Gross Domestic Product, 1970 and 1979, on page 158 of the 2013 edition.

Looking for example data on which to apply this, I picked up a table from Rebecca Lenihan’s From Alba to Aotearoa which I’m reading at the moment. It’s a comprehensive look at what can be known about Scottish immigrants to New Zealand from 1840 to 1920 and includes a fair amount of tabular information that is ideal for presentation with this sort of graphic. Here’s where I got to with visualising one of her tables (Table 3.6 on page 105, for those following along), showing the disproportionately maleness of Scottish immigrants in the nineteenth century even compared to other ethnic groups.

The key message from this graphic is that for both Scottish and Irish migrants to New Zealand in the nineteenth century, females were under-represented; but the ratio of females to males was noticeably lower for those of Scottish origin (all the provinces to the left of and above the pale blue diagonal line).

Lenihan’s original table includes a range of additional information that can’t be easily shown in this graphic, so the graphic is very much a complement rather than replacement of the detailed numeric information. But for the two dimensions that it does show, it’s nice example of integration of detailed numeric data into spatial representation - a combination of numbers and graphic visualisation.

## Features of this approach

Now I’ve noticed the trick of over-riding the boring, traditional regular spacing of axis text and tick marks, I think it might become a regular part of the repertoire for sparse two-dimensional data. The key technical features of this as a graphic include:

• The province labels are carefully in pale grey, and the points representing the actual data are the final layer and in black so they are in the foreground of the graphic
• I use pale blue, with different shades of transparency, to put some of the non-data guides (like the line representing equality between the two ethnicities’ female-male ratios) into the background.
• Even with this sparse summarised data, some of the actual values are too close for the axis text to include every value. In those cases (eg 81.3% and 81.5% female-male ratios for Canterbury and Otago people of Scottish descent) I’ve included a single average value as the axis text and tick mark, but used “rug” marks to indicate the two different actual values
• the vertical and horizontal coordinate systems are forced to be equal, so a centimetre of distance in either direction equates to the same amount of change in female-male ratio
• Because it’s all a homage to Tufte, I’ve used serif fonts rather than my usually preferred non-serifs…

## Using the breaks= argument in scale_XXX_continuous()

Here’s the code in R that does all that. Big thanks to the authors of the ggplot2, scales, ggrepel and ggthemes R packages, and a note that the latest dev version (from GitHub) of ggplot2 is needed for the subtitle and caption to work.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.45386993885040283, "perplexity": 1746.677787925998}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-13/segments/1490218189884.21/warc/CC-MAIN-20170322212949-00474-ip-10-233-31-227.ec2.internal.warc.gz"}