Danger, explosive material: the dynamite plunger plot

(This was originally written with University of Toronto immunologists in mind, but this material certainly applies to anyone else thinking about committing this sort of atrocity. Hopefully I’ll get around to posting some R code later as well.)

You tremble with excitement and fear at the front of the conference room, your fingers reaching for the trackpad on your laptop, about to display the first glorious bit of results from your project. Sitting in front of you are three other people – it’s your first committee meeting.

Click.

Your nervous grin slowly gives way to confused look as your eyes wander to the committee member to the right. She firmly sets her coffee cup on the table, her fingers trembling.

“Martha, what’s wrong with this figure?” asks your supervisor, seated to the left.

Martha splays several fingertips on her forehead, ventilating heavily in an attempt to avoid an outburst of anger.

“Is it the data?” asks your supervisor.

“No. The problem,” mumbles Martha, “is how it’s displayed. No one should ever use these types of plots.”

“Martha, I demand that all my students use these plots. Every single time. No exceptions. Why complicate things? They’re easy—”

“What?! That is complete garbage and you know it!” growls Martha, staring into the soul behind your supervisor’s eyes.

pl1

 

Data visualization can make the difference between a breakthrough discovery and an erroneous conclusion. Unfortunately, I have the great displeasure of witnessing dynamite plunger plots in the vast majority of presentations by our students and faculty. These aberrations are characterized by a bar and – often one-sided – error bar. The only things missing are “ACME” labels. Let’s deconstruct this plot and construct a more worthwhile visualization.

For our purposes, I downloaded gene expression data from the Gene Expression Omnibus for a study comparing gene expression in children with systemic juvenile idiopathic arthritis (sJIA) versus those with other forms of JIA and healthy controls. As the authors weren’t precise about how their gene expression data in GEO was transformed, I simply shifted expression values so that the minimum value was zero.

Let’s be cute and look at IL-18 expression levels as we all love inflammasomes. We will limit ourselves to control samples as well as five subtypes of JIA from whom a non-small number of samples were collected.

I visualized the data using Hadley Wickham’s excellent ggplot2 package in R – by the way, RStudio is a great piece of software if you ever wish to explore R.

Human reasons to avoid dynamite plunger plots

As you will soon find out, there are two primary reasons not to use these terrible dynamite plunger plots:

  1. I will think you utterly have no clue what you are plotting – or I will think that you are being cognitively lazy.
  2. I will entertain the possibility that you are lying by omission.

Thankfully, I’m graceful enough to not entertain the latter possibility.

A waste of ink

Apart from the human factors, let’s consider the first problem: dynamite plunger plots have low data-to-ink ratios. They’re like tabloids whose cover pages overflow with hyperbole – much screaming and hand-waving over possibly nothing in a deft attempt at deflection and/or attention. See the bars? They don’t add to the figure; they detract from it. They could be white and still detract from the main message of the figure.

How can we fix this issue? Remove the bars, of course:

pl2

Error bars are generally not one-sided

We removed the bars, but now this figure looks completely ridiculous. This figure should really have two-sided error bars. This figure should also give pause for those of us who have been drawing bar plots with unnecessarily one-sided error bars.

Forcing readers to mentally recreate missing elements distracts them from the actual message of the figure. So why would we ever consider omitting the lower error bar?

Let’s fix this by adding the lower error bar:

pl3

For some reason, many of us prefer to display the standard error of the mean (SEM). Given our propensity to run ANOVAs and t-tests on our data, we should actually display 95% confidence intervals instead. They still only roughly visualize whether two groups differ in expression values, but they’re certainly better than the SEM or standard deviation (SD) for that purpose. Even one of our favourite statistical packages, GraphPad PRISM, suggests that SEMs and SDs are less than ideal choices for error bars.

Let’s change these error bars to 95% confidence intervals:

pl4

At this point, we have made great strides from our original dynamite plunger plot. However, there is still a major problem – we are only displaying a summary of the data, and therefore we have no idea how the data is exactly distributed.

In our case, let’s add the actual values themselves to our visualization:

pl5

Albeit slightly cluttered, the points do not serve as mere decoration – they add information by indicating what the original expression levels are.

For those of us who will take means and anything tied to an SD to our graves, this is a fine place to stop.

Data may not be symmetrically distributed

However, if we look at the distribution of points, we might notice that IL-18 expression in the RF-negative polyarthritis subtype is likely skewed towards zero, betraying the mean and confidence intervals we have plotted. This is another issue with dynamite plunger plots as we often use them: our data may be skewed, meaning that equal-length error bars are inappropriate.

We can perhaps consider a box-and-whisker or box plot instead:

pl6a

The box bounds and “band” are defined consistently as the 25th (Q1), 50th (median), and 75th (Q3) percentiles from bottom to top. The whiskers, in this case, stretch to the farthest non-mild outlier points (Q1 – 1.5 × interquartile range; Q3 + 1.5 × interquartile range). We can also redefine the whiskers as the 2.5th and 97.5th percentiles:

pl6b

In short, the whiskers can represent anything, as long as it’s made clear what they represent. At this point, we have some idea as to how our data is distributed – for example, whether our data is skewed.

However, there is one weakness we haven’t discussed yet that both dynamite plunger plots and box plots share – what if the data is, for example, bimodal? To answer this question, we need our original points again:

pl7

This is starting to look overwhelming. Instead, we can turn to a violin plot:

pl8

Each “violin” surrounds its corresponding box plot and denotes the density, or how tightly clustered observations are, around each value on the y-axis. Depending on who you talk to, one could argue that IL-18 transcript expression in the enthesitis-related group may be bimodal given the two noticeable “bulges” in its violin.

Needless to say, with numerous samples, a violin plot may be useful in identifying situations where we may have not considered other factors important in influencing the outcome of an experiment. Unfortunately, our favourite programs, GraphPad PRISM and SigmaPlot, can’t generate these plots.

Of course, these aren’t the only ways to visualize our data. But heaven forbid, stay away from dynamite plunger plots.

In closing

Like comments on internet news websites, dynamite plunger plots appeal to our basest motivations and desires for instant gratification, robbing us of the display of information that aids us with interpreting our results with critical thought.

It is time, as a department, to take data visualization seriously. We devote all of our time, care, and honest effort into ensuring that our science is amazing – let’s avoid employing such a flawed and dishonest type of plot ad nauseum, which does an incredible disservice to our science when we communicate it to other scientists.

Resources

Articles

Thanks to Eric Ma for providing initial feedback for this post.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s