Bubble plot: show three variables on one scatterplot

Updated

A bubble plot is a scatterplot in which each point is a circle whose size shows a third variable. Position gives two variables precisely, and size adds a rough sense of a third, such as volume, cost or count. It works for a few dozen items at most, where each bubble is something you can name: a machine, a product, a supplier or a line.

When to use it

  • You want to rank or prioritize items that differ on three measures at once, for example machines by age, downtime and output.
  • The third variable is a quantity of "how much is at stake", such as volume or cost, and a rough comparison is enough.
  • There are few enough items, roughly 5 to 30, to label each bubble.

For precise reading of the third variable, use a table, a second chart or color with a legend instead. People judge areas much less accurately than positions.

How it works

  1. Plot each item at (x, y), as in a scatterplot.
  2. Draw a circle around the point whose area is proportional to the third variable, z. Since the area of a circle grows with the square of its radius, the radius follows the square root:
radius = c × √z

where c is a scale factor chosen so the largest bubble does not swamp the plot.

  1. Draw the largest bubbles first, or make them partly transparent, so small ones are not hidden.
  2. Add a size legend with two or three reference bubbles, and label the bubbles if there is room.

The size variable must be zero or positive. Negative values, such as a profit that can be a loss, need a different encoding, such as color.

Example

A maintenance manager has budget to overhaul one of seven injection presses. For each, she collects its age, its unplanned downtime over the last six months (average hours per month), and its average monthly output (thousands of parts).

PressAge (years)Downtime (h/month)Output (thousand parts/month)
P134.5120
P256.0210
P385.2180
P4119.895
P5148.1160
P61714.660
P72116.9140

A bubble plot puts age on the horizontal axis, downtime on the vertical axis, and output as bubble size. The bubbles climb from lower left to upper right: older presses lose more hours (the correlation between age and downtime is 0.93). The two presses in the upper right, P6 and P7, have the most downtime, but their bubbles differ: P7's output of 140 thousand parts per month is more than twice P6's 60 thousand, so an hour lost on P7 costs more parts. P7 is the natural first candidate. P4, with moderate downtime and a small bubble, can wait.

The scaling matters. Output ranges from 60 to 210 thousand, a ratio of 3.5. With area proportional to output, P2's bubble has a radius √3.5 = 1.87 times P6's and looks about 3.5 times as large, which is right. If the radius were made proportional to output instead, P2's bubble would cover 3.5² = 12.25 times the area of P6's and would overstate the difference by a factor of 3.5.

How to read the results

  • Read position first. The two axes carry the precise information. The pattern of the bubbles' centers is a scatterplot like any other.
  • Use size to rank, not to measure. "P7 makes a lot more than P6" is a safe reading; "P2 makes 3.5 times as much as P6" is better read from the table.
  • Look for big bubbles in the bad corner. In prioritization charts, large bubbles where both axes are unfavorable are where action pays most.
  • Check the size legend. Make sure the plot scales area, not radius, and note what the smallest and largest bubbles stand for.

Common mistakes

  • Scaling the radius to the data. This exaggerates every difference by squaring it. Area must be proportional to the value.
  • Too many bubbles. Beyond a few dozen, bubbles overlap into a blob. Use a heatmap or a binned scatterplot for large datasets.
  • Hiding small bubbles behind large ones. Draw large bubbles first or use transparency.
  • Adding 3D shading or perspective. It makes bubbles look like spheres, whose apparent volume misleads even more.
  • Encoding the most important variable as size. Put the variable that matters most on an axis, where it is read accurately.

Frequently asked questions

Should bubble size represent the radius or the area?

The area. The eye judges a circle by its area, so area must be proportional to the value, which makes the radius proportional to the square root of the value.

How many bubbles can a bubble plot show?

Clearly, about 5 to 30. Labels and overlaps become a problem beyond that.

Can I show a fourth variable?

Yes, with color for a category such as plant or product family. More than four variables on one chart is usually hard to read; consider a matrix plot or a parallel coordinates plot.

When is a bubble plot better than a table?

When the pattern across items matters more than the exact numbers, as in ranking presses for an overhaul. When people need the exact values, give them the table too.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab