Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Infographic Design Elements

DS 2023 | Communicating with Data

Overview

An infographic combines visual elements — charts, large numbers, short text, icons, and a layout — into one composition that tells a story.

It walks a reader through an argument, one visual element at a time.

In contrast to notebooks, which are designed for exploration, infographics are explanatory.

The analyst has already found something, and the infographic’s job is to make a reader understand it quickly, believe it, and remember it.

Infographics introduce some new design elements that we have not seen yet.

For example, this notebook adds big numbers, unit charts (waffles and pictograms), and layout as a tool for telling a story in order.

Use Cases

News and magazine graphics: a full-page explainer of an election, a storm, or a budget.

Public health and safety: posters about vaccination rates, hand washing, or the signs of a stroke.

Reports for the public: the one-page summary at the front of an annual report or a census release.

Science communication: a visual abstract of a paper, or a poster at a conference.

Social media: a single tall image, meant to be read on a phone in a few seconds.

Classrooms and museums: a wall panel that a visitor reads standing up.

A Short History

Infographics are older than the word.

William Playfair, whom we met in Area Charts, published charts with explanatory text and labels in his Commercial and Political Atlas (1786).

Florence Nightingale used her Diagram of the Causes of Mortality in the Army in the East (1858) to persuade officials that more soldiers in the Crimean War were dying of preventable disease than of wounds.

Charles Joseph Minard’s map of Napoleon’s march on Moscow (1869) combines a map, a flow, a temperature line, and dates in a single image.

W. E. B. Du Bois and his students at Atlanta University made dozens of hand-drawn data portraits of Black life in America for the 1900 Paris Exposition, many of them bold, colorful, and built for viewers who had never thought about the subject.

The Anatomy of an Infographic

Most infographics are built from the same parts.

PartWhat it doesOur tool
Headlinestates the story in one line, as an active titlefig.text(), large and bold
Subtitle (or “dek”)one or two sentences of context under the headlinefig.text(), smaller and gray
Big numbera single striking figure, with a short labela text-only axes
Modulesthe sections of the story, each with its own small titleaxes in a mosaic
Chartsthe evidence in each modulePandas .plot
Unit chartscounts made visible as squares or iconsplot.scatter with square or custom markers
Annotationslabels and callouts that say what to noticetext(), annotate(), bar_label()
Source and creditwhere the data came from, and who made the graphicfig.text(), small and gray

The parts are arranged in a reading order.

Readers of English start at the top left and move down, so the headline goes at the top, the strongest evidence next, and the details and source last.

The data

Loading...

We will build one infographic, about who survived the sinking of the Titanic in 1912.

The titanic dataset has one row per passenger.

The question

As we saw earlier in this course, the dataset tells a story of who survived the disaster.

It provided data to answer: What characteristics of a person contributed to their survival?

Based on what we already know about the data, the columns we will focus on are survived, sex, and class.

What’s the story?

A good infographic starts with a question, not a chart.

Before drawing anything, we write down the story we want to tell.

The we gather the claims that support it.

Story: On the Titanic, a passenger’s sex and ticket class largely determined who lived.

Claims:

  1. Fewer than four in ten passengers survived.

  2. Most women survived, and most men did not.

  3. Survival fell with ticket class.

  4. The gap is widest between first-class women and third-class men.

Each claim will become one module.

Let’s analyze the data to support the story and the claimns.

Number of passengers in dataset: 891
Number of survivors in dataset: 342
Survival rate 38%
Loading...
Loading...
Loading...

All four claims hold.

Notice how large the extremes are: 97% of first-class women survived, and 14% of third-class men.

That contrast is the most striking fact in the data, so it deserves the most prominent place.

Building Block 1: The Big Number

Many infographics open with a single large number.

A big number gives the reader a place to focus.

We define a function to create these as needed.

Now we create a row of key numbers.

These are often KPI -- key performance indicators -- in other infographics.

The number row

<Figure size 1200x200 with 4 Axes>

About the use of the accent color

The three numbers about survival are in the accent color.

This is because in this infographic, the accent color will mean one thing: survived.

Building Block 2: The Waffle Chart

All percentages are easy to understand, a more powerful way of presenting them is visually.

We could use a bar for this, but a more effective way is to use a waffle chart.

A waffle chart consists of a square grid of 100 little squares.

Each little square stands for a percentage point, with the share we care about filled in.

This makes the percentage visually countable.

Creating a waffle chart from scratch

A waffle is a scatter plot of discrete data and square-shaped points.

We can build one in the following way.

Loading...

Now we draw the empty and filled squares as two scatter plots on the same axes, with square markers.

<Figure size 400x400 with 1 Axes>

The axes are turned off because rows and columns mean nothing here; only the count of squares does.

set_aspect('equal') keeps the grid square, so each cell is the same size.

A general function

Now let’s put this in a function, so we can draw a waffle for any share on any axes.

To compare two groups, we put two waffles side by side.

We loop over a list of groups with enumerate() and reach the axes by index.

<Figure size 800x400 with 2 Axes>

Side by side, the two grids make the difference between 74 squares and 19 squares something a reader can see, not just read.

Building Block 3: Pictograms

A pictogram is a unit chart with icons instead of squares.

Isotype’s rule states that each icon stands for a fixed number of people or things, and that bigger quantities get more icons, not bigger icons.

Let’s see why the rule matters before we follow it.

Making an icon from scratch

Matplotlib can create arbitrary shapes with Path.

A shape can then be used as a marker in a plot.

A path is a just list of points and instructions for joining them.

Let’s use them to draw a simple person from a circle for the head and a polygon for the body.

<Figure size 200x200 with 1 Axes>

When icons mislead: scaling

Let’s use our icon to demonstrate a design principle.

Let’s compare the number of passengers in first and third class.

Third class had about 2.3 times as many passengers.

The tempting picture is one icon per class, with its height scaled to the count.

Third class / first class: 2.27 times as many passengers
Area of a scaled icon:     5.17 times as large

A marker’s size s in Matplotlib is an area, in points squared.

If the icon’s height grows by 2.27, its area grows by 2.27², or 5.17.

The reader sees the area.

Loading...

Now we plot our data two ways.

<Figure size 1200x350 with 2 Axes>

On the left, the third-class icon looks about five times bigger than the first-class icon, when the real ratio is about two.

On the right, a reader can count: 11 icons, 9 icons, 25 icons.

The repeated icons are honest because length, not area, carries the number, just as in a bar chart.

A row of icons is a bar chart, with the bar cut into countable pieces.

A pictogram that tells the story

Now let’s color each icon by outcome, so each row shows both how many passengers were in a class and how many of them survived.

We count survivors and deaths in each class, convert them to icons, and build one row per class.

Loading...
<Figure size 1000x300 with 1 Axes>

Now one picture shows two things at once.

The rows grow longer as we go down, because third class was the largest.

The blue share shrinks as we go down, because survival fell with class.

Notice that survivors come first in each row, so all the blue starts at the same left edge, like the bars of a stacked bar chart.

What would the reader lose if the blue and gray icons were shuffled within each row?

Building Block 4: A Chart with Emphasis

Our last claim compares six groups: each class, split by sex.

That is a job for an ordinary bar chart, sorted, with the extremes picked out in color, as in From Bad to Better.

First, let’s shape the data: stack the class-by-sex table into one Series with readable labels.

Third class, men 0.135447 Second class, men 0.157407 First class, men 0.368852 Third class, women 0.500000 Second class, women 0.921053 First class, women 0.968085 Name: mean, dtype: float64
<Figure size 800x350 with 1 Axes>

Note that the bars start at zero, as all bars should.

The x axis is hidden because every bar is labeled with its value; the axis would only repeat the labels.

The title states the contrast, and the two bars in the accent color are the evidence for it.

The other four bars are gray, not because they do not show survival, but because they are context for the two that make the point.

Layout: Putting the Modules in Order

We now have four modules, one per claim.

An infographic arranges them on a grid, in the order the story should be read.

plt.subplot_mosaic(), from Subplots and Mosaics, is the right tool, since each module can span as many columns as it needs.

Let’s sketch the layout first, with each module labeled by name.

<Figure size 850x1100 with 8 Axes>

This kind of sketch is called a wireframe.

It lets us check the reading order and the space each module gets before any data is drawn.

The order follows the claims: the big numbers first, then sex, then class, then the two together.

Notice that each row of the grid is a step in the argument.

Putting It Together

Now we fill the wireframe.

Every module is drawn by one of the functions we wrote, and the headline, dek, and source line are figure-level text.

Let’s also set the type sizes in one place, so the hierarchy is consistent.

TextSize (pt)WeightColor
Headline22boldblack
Dek11normaldim gray
Big numbers40boldaccent
Module titles12–13boldblack
Labels10–11normalblack or gray
Source8normalgray

Each level is clearly larger than the one below it, so a reader can tell at a glance what to read first.

<Figure size 850x1100 with 8 Axes>

The headline gives the story in nine words.

The subtitle adds the context and the reason.

The big numbers give the scale in a glance, and the three modules below make the case in steps, each with a title that says what it shows.

The source line says where the data came from, and that it is a sample.

Notice what we did not add: no background images, no 3-D, no decorative icons that do not stand for data.

Every mark on the page is either data or a label for data.

What else would you add for a reader who knows nothing about the Titanic? What would you take out?

Color and Type

Infographics use far fewer colors than most people expect.

A common pattern, and the one we used, is one accent color plus grays.

  • The accent marks the thing the story is about: here, survival.

  • Gray marks everything else: deaths, context, labels.

Because the accent means the same thing in every module, the reader learns it once and needs no legend.

This is the same idea as the species_colors dictionary in Color: one meaning, one color, everywhere.

For type, choose one font family and make the hierarchy with size, weight, and color, as in the table above.

Decoration: Useful or Junk?

Edward Tufte called decoration that does not show data chartjunk, and From Bad to Better showed how it clutters a chart.

Infographics are where the argument about decoration is liveliest.

In a 2010 study, Scott Bateman and colleagues found that readers remembered heavily illustrated charts, in the style of the designer Nigel Holmes, better than plain ones two to three weeks later, without reading them less accurately.

In 2013, Michelle Borkin and colleagues found that charts with pictograms and other human-recognizable objects were among the most memorable in a large collection.

So decoration is not always junk.

A good rule is the one Isotype followed: a picture should mean something.

An icon that stands for 20 passengers adds both memory and information.

A clip-art ship in the corner adds memory, but no information, and takes space from the data.

When Infographics Mislead

  • Scaled icons. An icon scaled by height grows by the square in area, as we saw: 2.3 times the count looked like 5 times. Repeat icons instead.

  • Numbers without denominators. A big number like 1,500 deaths means little without out of how many, and a percentage means little without the size of the group.

  • Mixed bases. Percentages of different wholes, placed side by side, invite false comparisons.

  • Factoids. A collection of unrelated numbers, each with an icon, is not a story. If a module does not support the headline, cut it.

  • Decoration over data. Backgrounds, 3-D effects, and ornaments that make the data harder to read.

  • Distorted shapes. Bars drawn as pencils or bottles, or pies drawn as plates in perspective, change the areas the reader compares.

  • Overstated headlines. A headline is a claim. Check it in code, as we did in Plan Before You Draw.

  • Missing sources. An infographic without a source cannot be checked, and it travels far beyond its maker on social media.

Which of these would be easiest to commit by accident?

A Checklist

Story

  • Can you state the story in one sentence? Is it the headline?

  • Does every module support the headline?

Honesty

  • Is every number in the graphic computed from the data, not typed by hand?

  • Does every percentage say of what, and is the group size given?

  • Do icons repeat rather than scale? Do bars start at zero?

Hierarchy and layout

  • Is there a clear reading order, from the headline down?

  • Are there no more than three or four levels of type?

  • Does the main point get the most space?

Color

  • One accent color, with a fixed meaning? Grays for the rest?

  • Does it still read in grayscale?

Finish

  • A source line, with the sample described?

  • Saved at the size and resolution it will be shown?

Summary

  • An infographic combines charts, numbers, text, and icons into one composition that tells one story to a reader who will not stay long.

  • Start with a sentence, list the claims that support it, and check every claim in code before drawing.

  • A big number is text in an empty axes; it always needs a label that says of what.

  • A waffle chart is a scatter plot of a 10 × 10 grid with square markers; it makes a percentage countable.

  • A pictogram follows Isotype: one icon stands for a fixed quantity, and larger quantities get more icons, not bigger ones.

  • A scaled icon misleads because the reader sees area, which grows with the square of height.

  • Lay out modules with plt.subplot_mosaic(), sketch the wireframe first, and order the modules as the steps of the argument.

  • Use one accent color and grays, one font family, and a clear type hierarchy.

  • Decoration that means something can help memory; decoration that means nothing takes space from the data.

TaskCode
Big numberax.set_axis_off() then ax.text(..., fontsize=40, transform=ax.transAxes)
Waffle gridrow = cell // 10, col = cell % 10, filled = cell < n
Square markersdf.plot.scatter(x='col', y='row', marker='s', s=..., ax=ax)
Custom iconPath.make_compound_path(Path.circle(...), Path([...]))
Icon as markerdf.plot.scatter(..., marker=person)
Layoutplt.subplot_mosaic(layout, height_ratios=[...])
Headline, dek, sourcefig.text(x, y, '...', fontsize=..., color=...)
Save at final sizefig.savefig('infographic.png', dpi=200)

References

  • Bateman, Scott, Regan L. Mandryk, Carl Gutwin, Aaron Genest, David McDine, and Christopher Brooks. “Useful Junk? The Effects of Visual Embellishment on Comprehension and Memorability of Charts.” Proceedings of CHI 2010.

  • Borkin, Michelle A., et al. “What Makes a Visualization Memorable?” IEEE Transactions on Visualization and Computer Graphics 19, no. 12 (2013).

  • Battle-Baptiste, Whitney, and Britt Rusert, eds. W. E. B. Du Bois’s Data Portraits: Visualizing Black America. Princeton Architectural Press, 2018.

  • Cairo, Alberto. The Functional Art: An Introduction to Information Graphics and Visualization. New Riders, 2012.

  • Holmes, Nigel. Designer’s Guide to Creating Charts and Diagrams. Watson-Guptill, 1984.

  • Neurath, Otto. International Picture Language. Kegan Paul, 1936.

  • Tufte, Edward R. The Visual Display of Quantitative Information. Graphics Press, 1983.