Avoid stacked and overlapping histograms
Back to the Chart galleryxpd charts
How does the shape of lunch bills compare with dinner bills?
Plotly Express Tips dataset, lunch (n=68) and dinner (n=176) restaurant bills.
“Stacked histograms are confusing because the upper bars no longer share a common baseline”
Also covered in Few 2012 (6 FUNDAMENTAL VARIATIONS OF GRAPHS, p. 135).
Before
Interactive chart unavailable.
After
Interactive chart unavailable.
Values
Lunch checks center around a 15.96 USD median while dinner checks center around 18.39 USD.
Lunch bills concentrate sharply around 13 to 17 USD while dinner bills extend into a wider right tail.
| Service | Checks | Median bill (USD) | Mean bill (USD) |
|---|---|---|---|
| Lunch | 68 | 15.96 | 17.17 |
| Dinner | 176 | 18.39 | 20.8 |