Beyond Bar Charts: Visualizing Continuous Data

Bar charts with error bars are the most frequent type of visualization in psychology articles, and also one of the least informative. A bar chart showing the mean of two groups with a standard error bar hides practically all relevant information about the data: you cannot see the distribution, you do not know if there are outliers, you have no idea of the individual variability, and a Y-axis starting at zero can make real differences appear trivial or trivial differences appear enormous. It is a format that has been maintained by tradition rather than utility, and the good news is that there are much better alternatives available with very little additional effort.

The fundamental problem with bar charts is that they summarize an entire distribution into two numbers: the mean and a measure of dispersion. Two completely different distributions can produce exactly the same mean and the same standard deviation. Anscombe demonstrated this brilliantly with his famous quartet, and more recently the datasaurus (Matejka and Fitzmaurice, 2017) illustrated it in an even more striking fashion: datasets shaped like a dinosaur, a star, or parallel lines that share the same descriptive statistics. If your chart only shows those statistics, you are discarding all the information that makes your data unique.

Alternatives that show the actual data

The simplest alternative to the bar chart is the dot plot (strip plot or jitter plot), where each individual observation is represented as a point. This allows you to immediately see how many observations there are, how they are distributed, whether there are clusters or outliers, and whether the distribution is symmetric or skewed. When you have multiple groups, you can add an indicator of the mean or median (a horizontal line, a diamond, a larger point) to facilitate comparison between groups without sacrificing individual-level information.

Violin plots are another excellent option that combines the best of density plots and boxplots. The shape of the violin shows the estimated distribution of the data in each group, which makes it possible to detect bimodality, asymmetries, and other features that would be completely hidden in a bar chart. If you also overlay individual data points within each violin (which is sometimes called a raincloud plot when combined with a half-violin and a boxplot), you obtain an extraordinarily informative visualization that simultaneously shows the distribution, summary statistics, and individual data.

Raincloud plots, proposed by Allen et al. (2019), deserve special mention because they are probably the most comprehensive way to visualize group data. They combine three elements: a half violin plot (which shows the distribution), a reduced boxplot (which shows the median, quartiles, and outliers), and individual data points shifted laterally. The result is a chart that conveys all the relevant information clearly and attractively. The ggrain package in R facilitates their creation, although they can also be built manually with ggplot2. For meta-analyses, another equally important specialized chart is the forest plot; if you are interested, see our guide on the anatomy of a forest plot.

Visualizing relationships and longitudinal effects

For longitudinal or repeated measures data, spaghetti plots are especially revealing. In these plots, each participant is represented as a line connecting their data points over time. This allows you to see not only the mean trend of the group but also the between-participant variability in the shape and direction of change. It is common to discover in a spaghetti plot that the group mean hides very different individual patterns: some participants improve, others worsen, and others remain stable, yet the mean suggests a uniform moderate change.

For relationships between continuous variables, scatter plots remain the best option, but they can be enriched considerably. Adding a regression line with its confidence band allows you to visualize the linear relationship and the associated uncertainty. Using smoothed curves (LOESS or GAM) instead of straight lines allows you to detect nonlinear relationships that a linear model would not capture. And if you have a categorical moderating variable, coloring the points by group and fitting separate lines allows you to visualize interactions intuitively.

Tools and practical recommendations

In terms of tools, ggplot2 in R is undoubtedly the reference standard for data visualization in research. Its grammar of graphics logic (layers added with the + operator) is initially unintuitive if you come from Excel or SPSS, but once you understand it, the flexibility it offers is unmatched. For those who prefer a graphical interface, JASP produces reasonably good plots automatically, and jamovi has a visualization module that generates violin and raincloud plots without the need for code.

Regardless of the tool you use, the fundamental principle is to show the data, not just the summaries. More and more journals and reviewers expect to see individual data in the plots and that results follow the guidelines for reporting results in APA 7 format, and some journals already explicitly require that bar charts be accompanied by data points or replaced with more informative alternatives. To make sure your statistics meet the format, try our APA results formatter. Adopting these practices not only improves the communication of your results but also forces you to look at your data more carefully, which often reveals patterns that numerical analyses alone do not detect.

Keep reading

All blog articles