Datasaurus Dozen: Same Statistics, Different Graphs
The Datasaurus Dozen shows 13 datasets with the same statistics and different graphs. See why box plots hide the same problem and what to chart instead.

The Datasaurus Dozen is the best known proof that summary statistics can hide what a chart shows at once: thirteen datasets with the same means, standard deviations and correlation, one of which is a drawing of a dinosaur. This article covers the famous half of that result and the half almost nobody retells, which is about the box plot.
What is the Datasaurus Dozen?
The Datasaurus Dozen is a set of 13 datasets of 142 points each that share the same mean, standard deviation and correlation to two decimal places but look completely different when plotted. Justin Matejka and George Fitzmaurice published it in 2017, starting from Alberto Cairo's dinosaur-shaped scatterplot.
The half of the paper nobody retells
Everyone in data visualization knows the dinosaur. A dataset whose mean, standard deviation and correlation look utterly ordinary, and whose scatterplot is a picture of a Tyrannosaurus. It is a great demonstration and it has been told so many times that it has stopped doing any work.
It is also the weaker half of the paper it comes from.
The stronger half is one paragraph on page four, and it is about the box plot. Not a chart anyone is misusing. Not a chart with a silly shape hiding in it. A summary chart, doing exactly the job it was designed for, on data that looks entirely reasonable, and still collapsing six different distributions into a single identical picture.
Start with the box plot
Here are six datasets. I built them for this article, and I will show you exactly how in a moment. Every one has the same minimum, the same lower quartile, the same median, the same upper quartile and the same maximum.
A box plot draws exactly those five numbers, plus fences at 1.5 times the interquartile range. None of these six datasets has a single point beyond a fence, so there are no outlier marks either. Every mark a box plot can draw is therefore identical across all six.
Which means a box plot of these six datasets is six copies of the same drawing. That is not a criticism of anyone's technique. It is arithmetic.
Now here is the same six with their raw points laid over the boxes.
One dataset is evenly spread. One is two tight clumps with a hollow middle. One is four separate spikes. One is pressed against the edges of every band. One leans upward throughout. One is riddled with gaps. Strip the points away and a box plot reports all six as the same data.
Stripped of the boxes entirely, the point clouds are not even close.
Why this is easier than it looks
Justin Matejka and George Fitzmaurice's paper is about simulated annealing, and the scatterplot half genuinely needs it. The box plot half does not, and understanding why tells you what a box plot is actually promising.
A five-number summary pins five values. It also, by definition, puts exactly a quarter of the observations into each of the four bands those values create. So the counts per band are not free. What is completely free is where inside each band the points sit.
That single degree of freedom is the whole vulnerability. I fixed the five anchors, then placed the interior points of each band wherever I liked. No search, no annealing, no tolerance. The five-number summaries above are identical because they were constructed to be, exactly, in a few lines of code.
It is worth being clear about what that does and does not show. My six are a construction, built to make a point, and so are the paper's. Neither is evidence that real datasets routinely collide this way. What they show is that the box plot cannot rule the collision out, which is a claim about the chart rather than about the world.
The paper's own version, and the number that should worry you
Matejka and Fitzmaurice did the same thing, harder. Their Figure 9 caption reads: "Six data distributions, each with the same 1st quartile, median, and 3rd quartile values, as well as equal locations for points 1.5 IQR from the 1st and 3rd quartiles. Each dataset produces an identical boxplot." They start from a normal distribution and push the data left, right, to the edges, and to arbitrary points along the range.
A note on counting, since I got this wrong myself before checking. The paper shows six panels. The data file released with it contains five groups of 2,484 points, so the numbers below are computed on five. Their five agree to about two decimal places rather than exactly, and they are not built from a single algebraic trick, which makes them a fairer test than mine.
Their five do not share a mean. They do not share a standard deviation. Means run from -1.18 to 1.17 and standard deviations from 3.84 to 4.98. Nothing in the box plot's vocabulary can see any of that.
Here is the sharpest way I found to put it. Take each distribution and count how many of its 2,484 observations sit within one unit of its own median.
Four of the five have between 457 and 577 observations crowded around the median. The fifth has nine. That is a sixty-four fold difference in how densely the data sits around the exact line a box plot draws through all five of them, inside the exact same box.
The shapes those five distributions actually have look like this.
Now the dinosaur: same statistics, different graphs
With that established, the famous half lands differently.
The released Datasaurus Dozen holds 13 datasets of 142 points each: Cairo's hand-drawn dinosaur plus the 12 that Matejka and Fitzmaurice generated from it. Every one shares the same summary signature, and the numbers are worth printing because almost every retelling gets the last digit wrong.
Truncated at two decimal places, all 13 datasets report a mean x of 54.26, a mean y of 47.83, a sample standard deviation of 16.76 and 26.93, and a Pearson correlation of -0.06. One signature, thirteen datasets.
Recompute the same thing with ordinary rounding instead of truncation and you get eight different signatures. Mean x splits between 54.26 and 54.27, the correlation between -0.06 and -0.07. Nothing about the data changed; the last digit is doing what last digits do. I mention it because I generated exactly that broken table while writing this piece, and a table that visibly contradicts its own headline is a bad look in an article about checking your numbers.
The method behind the 12 is also usually described wrongly. It is not a random walk that keeps the statistics still. The algorithm nudges one or more points a small random distance, keeps the nudge if it moves the data closer to a target shape, and, under a simulated annealing schedule that cools from 0.4 to 0.01, sometimes keeps a nudge that does not, so the search can climb out of local optima. A move is only accepted if the summary statistics still match the seed to two decimal places. Their first example ran for 200,000 iterations, about ten minutes on a laptop.
What to actually do
The lesson usually drawn from the dinosaur is "always plot your data." That is right and it is not enough, because the box plot is plotting your data. It is a plot, drawn correctly, from the real numbers, and it still shows you nothing that distinguishes 577 from 9.
The useful version is narrower. A chart shows you what it encodes and nothing else. A box plot encodes five numbers and a fence rule, so it can answer questions about position and spread and it cannot answer questions about shape. If you need to know whether your data is bimodal, whether it has a gap, whether it clusters near the middle or hugs the edges, a box plot is not a weak tool for that job. It is the wrong tool, and adding more box plots will not help.
So, concretely. Use a box plot when you are comparing position and spread across many groups and you already know the shapes are unremarkable. When the number of observations is small enough, show the points, because a beeswarm answers everything a box plot answers and shows the shape too. When it is not, put a histogram or a density curve beside the box rather than instead of it. A violin plot does both jobs in one mark. And check for multimodality deliberately, because it is the failure mode a box plot is structurally incapable of reporting.
Which chart answers which question
| Question | Chart that answers it |
|---|---|
| Where is the middle, and how wide is the spread? | Box plot |
| Is there more than one peak, or a gap? | Histogram, density curve or violin plot |
| Where does every observation sit? | Beeswarm or strip plot, when the sample is small enough |
| How do two variables move together? | Scatter plot |
Building this in PlotSet
Every chart in this article is a PlotSet embed, and the sequence is the argument: a table that shows six identical summaries, a box plot that shows why that matters, a beeswarm that shows what was lost, a bar chart that puts a number on it, a line chart of the real distributions, and a scatter plot for the dinosaur. Six chart types, because six different questions.
That is the practical reason a chart library with range matters, and it is the reason we build PlotSet the way we do. If your tool makes box plots easy and beeswarms hard, you will ship box plots, and the shape of your data will quietly stop being something you look at. The friction of switching chart type is not a small inconvenience. It decides which questions get asked.
What we are not going to tell you is that any tool prevents the problem in this article. Nothing does. A summary is a summary in every piece of software ever written, and the collision here is arithmetic, not a rendering bug. What a good tool can do is make the second chart cheap enough that you always draw it. The step by step guides for a box plot and a histogram are a place to start, and the chart tricks that mislead readers most covers the failures that are not accidents.
Frequently asked questions
Why is it called the Datasaurus Dozen?
The seed dataset is Alberto Cairo's Datasaurus, a scatterplot he drew in the shape of a dinosaur in 2016. Matejka and Fitzmaurice generated 12 more datasets from it with the same summary statistics, which makes 13 in total, the dinosaur plus a dozen.
What is the difference between Anscombe's quartet and the Datasaurus Dozen?
Anscombe's quartet is four small datasets published by Francis Anscombe in 1973 with nearly identical summary statistics and very different plots. The Datasaurus Dozen makes the same point with 13 datasets and adds a method for generating such datasets from any starting shape.
Can two datasets have the same box plot and different distributions?
Yes. A box plot draws five numbers and a fence rule, so any datasets that share those values produce the same drawing. Where the points sit between the quartiles is not encoded, which is how an evenly spread dataset and a two-cluster dataset can look identical.
What should I use instead of a box plot?
Keep the box plot for comparing position and spread across many groups, and add a chart that shows shape. Plot the raw points when the sample is small, and use a histogram, density curve or violin plot when it is not.
References
- ACM CHI. Same Stats, Different Graphs. Matejka & Fitzmaurice, CHI 2017, 1290-1294 — https://www.research.autodesk.com/publications/same-stats-different-graphs/
- Autodesk Research. Same Stats, Different Graphs, supplementary data — https://www.autodeskresearch.com/publications/samestats
- The American Statistician. Graphs in Statistical Analysis. Anscombe, 27(1):17-21, 1973 — https://www.jstor.org/stable/2682899
- The Functional Art. Download the Datasaurus. Cairo, 2016 — http://www.thefunctionalart.com/2016/08/download-datasaurus-never-trust-summary.html
- CRAN. datasauRus. Locke & D'Agostino McGowan — https://cran.r-project.org/package=datasauRus
- Addison-Wesley. Exploratory Data Analysis. Tukey, 1977 — https://archive.org/details/exploratorydataa0000tuke
- Nature Methods. Bar charts and box plots. Streit & Gehlenborg, 11:117, 2014 — https://www.nature.com/articles/nmeth.2807
- Nature Methods. Visualizing samples with box plots. Krzywinski & Altman, 11:119-120, 2014 — https://www.nature.com/articles/nmeth.2813
- PLOS Biology. Beyond Bar and Line Graphs. Weissgerber et al., 13(4), 2015 — https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1002128
- had.co.nz. 40 years of boxplots. Wickham & Stryjewski, 2011 — https://vita.had.co.nz/papers/boxplots.pdf
- The American Statistician. Violin Plots. Hintze & Nelson, 52(2):181-184, 1998 — https://www.jstor.org/stable/2685478
- The American Statistician. Generating Data with Identical Statistics but Dissimilar Graphics. Chatterjee & Firat, 61(3):248-254, 2007 — https://www.tandfonline.com/doi/abs/10.1198/000313007X220057
- Journal of Computational and Graphical Statistics. Visual Scalability. Eick & Karr, 11(1):22-43, 2002 — https://www.tandfonline.com/doi/abs/10.1198/1061860021711
- TidyTuesday. The Datasaurus Dozen data files — https://github.com/rfordatascience/tidytuesday/tree/master/data/2020/2020-10-13


