Pyramid plot
A pyramid plot is a visualization that compares distributions across ordered categories using opposing or stacked bars or shapes.
D3.js in Action, Third Edition
A pyramid chart is a distribution chart that compares two distributions side by side using opposing or adjacent shapes.
- How it is used
- Compares two categorical distributions side by side across shared value brackets.
- How deep it goes
- Builds the chart with bins, separate scales, and proportional marks, but defers detailed implementation beyond focused construction guidance.
- Examples
- Uses salary distributions by gender and age distributions by gender, with bars, lollipops, and dumbbells.
- What you can do after
- Build it from scratch with D3 by binning two datasets and mapping their percentages to opposing chart halves.
Read how D3.js in Action, Third Edition explains pyramid plot →
Statistics Slam Dunk
A pyramid plot is a visualization that uses mirrored or stacked horizontal bars to compare distributions across ordered categories.
- How it is used
- Compares real and adjusted NBA salary-cap values across seasons using mirrored horizontal bars.
- How deep it goes
- Explains sign conversion, reshaping, axis labeling, and ggplot2 construction, stopping short of statistical modeling.
- Examples
- Uses NBA seasons, real dollars, adjusted dollars, mirrored bars, and million-dollar axis labels.
- What you can do after
- Build it from scratch in R by transforming paired measures and plotting them with ggplot2.
Related concepts
- d3.bin()uses · d3.bin() is a D3-array function that groups numeric values into bins according to a configured domain, thresholds, and value accessor.
- histogramhas part · A histogram is a representation that groups observations into bins and records their frequencies or counts.
- bar chartalternative to · A bar chart is a visualization that compares quantitative values for discrete categories using rectangular bars whose lengths or heights encode magnitude.
- dimensionhas part · A dimension is an independent coordinate or feature axis used to represent points or data; the dimensionality of a representation is the number of such axes or components.
- proportionuses · A ratio expressing a quantity relative to a whole or reference quantity, commonly represented as a fraction, decimal, or percentage.
Questions about pyramid plot
What is pyramid plot?
A pyramid plot is a visualization that compares distributions across ordered categories using opposing or stacked bars or shapes.
Which Manning books explain pyramid plot?
D3.js in Action, Third Edition and Statistics Slam Dunk.
What is the difference between pyramid plot and bar chart?
A pyramid plot is a visualization that compares distributions across ordered categories using opposing or stacked bars or shapes. A bar chart is a visualization that compares quantitative values for discrete categories using rectangular bars whose lengths or heights encode magnitude.
What are the parts of pyramid plot?
Pyramid plot includes histogram and dimension.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

