Violin plot
A violin plot is a statistical visualization that represents the distribution of numeric data with a mirrored, smoothed density shape, often accompanied by summary statistics.
D3.js in Action, Third Edition
A violin plot is a distribution chart that uses a mirrored, smoothed density shape to show where numeric observations are concentrated.
- How it is used
- Compares salary distributions across data-visualization roles while retaining their overall shapes.
- How deep it goes
- Builds violins step by step from filtered values, bins, scales, histogram bars, smoothed areas, and summary markers.
- Examples
- Uses salary distributions for analyst, developer, designer, scientist, and leadership roles.
- What you can do after
- Build it from scratch with D3 by converting category bins into mirrored smoothed areas and adding summary markers.
Read how D3.js in Action, Third Edition explains violin plot →
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
A violin plot visualizes the distribution and density of numeric values, often alongside summary statistics such as the median.
- How it is used
- Interprets how model features influence predictions through SHAP-value distributions, importance, direction, and feature-value associations.
- How deep it goes
- Explains width, shape, median, sign, color, and outliers, but does not develop the underlying density estimation.
- Examples
- Uses accommodation-price features such as availability, coordinates, bedrooms, and beds to illustrate prediction effects.
- What you can do after
- Apply it via SHAP to inspect which features matter and whether their values raise or lower predictions.
Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains violin plot →
Statistics Slam Dunk
A violin plot displays the distribution and shape of numeric data by combining a mirrored probability-density shape with optional summary statistics.
- How it is used
- Uses continuous-data distributions to compare shape, frequency, and summary statistics in practical analyses.
- How deep it goes
- Explains density shape, embedded summaries, and skewness, then demonstrates ggpubr construction without developing the density calculation itself.
- Examples
- Demonstrates games played and games won for current and past NBA franchises from 1946 through 2020.
- What you can do after
- Builds distribution graphics in R with ggpubr, adds boxplots and mean markers, and interprets density shape and skewness.
Related concepts
- box-and-whisker plotcontrasts with · A box-and-whisker plot is a statistical graphic that summarizes a numerical distribution using quartiles, a median, and whiskers or markers indicating spread and potential outliers.
- histogramalternative to · A histogram is a representation that groups observations into bins or value ranges and records their frequencies or other distribution summaries.
- density plotuses · A density plot is a visualization that estimates and displays the shape of a continuous variable’s probability distribution as a smooth curve.
- probability densityuses · A probability density function is a nonnegative function describing the distribution of a continuous random variable, whose integral over a region gives the probability of values in that region.
- meanuses · A mean is a measure of central tendency, calculated as the arithmetic average of values or, for a random variable, as the probability-weighted average of its possible values.
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.


