Biology & Informatics Krzysztof Kus

← Writing

Plotting — dos and don'ts

A working checklist for figures, assembled from a PLoS Computational Biology piece and a few additions learned the hard way.

An article in PLoS Computational Biology prompted an earlier post here on matplotlib’s xkcd mode. Rereading it, I agreed with most of what it said and wanted to add a few points of my own.

Much of what follows is common sense, which is precisely the argument for writing it down. Common sense is the first thing to go at eleven at night, two days before a deadline, on the fourth revision of a figure. A checklist is what stops an obvious mistake from surviving into print.

Before you draw anything

Who is going to look at this? Experts and students need different things. A specialist audience will tolerate density and unexplained conventions; a general one will not, and pretending otherwise is how a figure becomes decorative rather than informative.

How will it be seen? On a screen, in a printed journal, projected across a lecture hall? The answer governs font size, line weight and how much complexity the figure can carry. What reads perfectly on your monitor at arm’s length can be illegible from the back row.

What is the message? Decide it first, in a sentence. The chart type follows from that sentence, not the other way round. Talk your plots over with someone — the fastest way to discover that a figure does not say what you think it says is to watch another person read it.

While you are drawing it

  • Write a caption that can stand alone. A reader should be able to draw the right conclusion from the figure and its caption without hunting through the body text. This deserves real effort and usually gets the least.

  • Check every axis. Is the scale appropriate? Does it start where it should? Defaults are a starting point, not an answer, and a truncated axis is the easiest way to mislead without technically lying.

  • Choose colours that carry meaning. Care for colourblind readers is a virtue and costs you nothing. Projectors are also unkind to subtle palettes — a distinction that is clear on your laptop can vanish on a screen.

  • Show the data as it is. Avoid 3D when your data is 2D; the extra dimension adds distortion and no information.

  • Remove what is not needed. Gridlines, boxes, redundant legends, decorative shading. Every element should earn its place.

  • Prefer a clear message to impressive graphics. These are not the same goal, and when they conflict the choice should not be difficult.

  • Do not overcomplicate the content. Two clear figures beat one exhaustive one. Splitting a panel is almost always cheaper than explaining it.

  • Use tools that suit the job. The best plotting library is the one you know well enough to control precisely.

None of this is difficult. It is just easy to skip, and the cost of skipping it lands on your reader rather than on you — which is exactly why it needs to be a list you actually run through.