Skip to content

DotPlot

Stable

Shows a best guess and how sure it is, with a caption that explains the marks.

Also known as scatter, strip plot, dot chart

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Happy customers, with a range

Dots show the share of happy customers. Lines show the range we are 95% sure it falls in. 200 customers per shop.

The caption says what is measured, how sure we are and how many customers. The text column gives the numbers.

When to use it

Shows a best guess and the range it likely falls in, one row per result. A caption says what the dot and line mean, because a bare range line means little to most readers.

Made of: Caption · Number scale · Row names · Range line with end caps · Best-guess dot · Numbers in text · Reference line (optional)

Use it for

  • Survey or test results where how sure you are matters.
  • Comparing groups of different sizes: turn on showN.
  • Results measured against a target, with a reference line.

Not for

  • Amounts that should be compared by bar length: use BarChart.
  • Change over time: use LineChart.

Do and avoid

Dot is the best guess. Line is the likely range.

Do. A caption explains the dot and line, with group sizes shown.

Scores

Avoid. No range and no group size make scores look surer than they are.

Do

  • Write the caption so a reader can say what the line means, how sure it is and how many people are behind it.
  • Show group sizes when groups are small or differ between rows.
  • Print the numbers as text, so no one has to read them off the scale.
  • When the question is how two things differ, show that difference directly.

Avoid

  • Don't leave the range line unexplained. A bare line means nothing.
  • Don't treat overlapping lines as proof that two results are the same. They are not.
  • Don't show scores with no range and no group size. At least show how many were asked.
  • Don't cut a bar chart to fit a range. This chart marks positions, not bar lengths, so its scale can start above zero.

On a phone

  • The chart measures its container and redraws at that width. Long row labels are shortened with an ellipsis to fit.
  • Touch a row to show the tooltip. Vertical swipes still scroll the page, and the tooltip stays until you tap elsewhere.
  • The caption above the chart wraps, so write it in plain words.

Seen in products

  • Hofman, Goldstein and Hullman find that interval displays can mislead about effect size, and the research brief notes that overlapping intervals do not reliably mean no difference.
  • A clinician study found that quantile dot plots reduced interpretation errors.
  • Wilke's visualization text notes that distributions show full variability.
  • The guidance is to label what error bars mean, naming the quantity and the level, for example 95% confidence intervals.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started