How to Make a Violin Plot for Scientific Papers
A complete guide to creating publication-quality violin plots. From density estimation to journal-ready export.
What is a scientific violin plot?
A violin plot is a data visualization that combines a box plot with a kernel density estimate. It shows the distribution of data across groups using a symmetrical shape that represents the density of data at each value. The width of the violin indicates how many data points fall at that value — wider means more data points.
What a violin plot shows:
- • Distribution shape — symmetry, skewness, multimodality
- • Density — width at each y-value indicates frequency
- • Median — marked as a dot or line inside the violin
- • Quartiles — optional markers inside the shape
- • Range — the full span of the violin shows data extent
Step-by-Step Guide
- Prepare your data
Collect replicate measurements for each group. Minimum 10–15 replicates per group for smooth violin shapes.
- Calculate density
Compute the kernel density estimate (KDE) for each group. The bandwidth determines smoothness — wider bandwidth = smoother curve.
- Draw the violin shape
Plot the density curve symmetrically around the central axis. The width at each y-value represents data density.
- Add summary statistics
Mark the median (dot or line) and optionally quartiles inside the violin. Add whiskers if needed.
- Label axes
X-axis: group names. Y-axis: measured variable with units. Ensure labels are readable at journal size.
- Export for publication
Set width to journal column width. Export at 300 DPI. Use a colorblind-friendly palette.
Violin Plot vs Box Plot vs Bar Chart
| Feature | Violin Plot | Box Plot | Bar Chart |
|---|---|---|---|
| Distribution | ✓ Full density | ✗ Summary only | ✗ None |
| Median | ✓ Yes | ✓ Yes | ✗ No |
| Outliers | ✓ Visible | ✓ Visible | ✗ Hidden |
| Best for | Continuous data | Continuous data | Counts |
Frequently Asked Questions
How do you make a violin plot for a scientific paper?
To make a violin plot: (1) collect replicate data for each group, (2) calculate the kernel density estimate (KDE) for each group, (3) draw the violin shape symmetrically around the density curve, (4) add a median line and quartile markers inside, (5) label axes and groups, (6) export at 300 DPI at journal width.
What is a violin plot?
A violin plot is a hybrid of a box plot and a density plot. It shows the distribution of data across groups using a symmetrical "violin" shape that represents the kernel density estimate. The width of the violin at any point indicates the frequency of data at that value. A violin plot shows both the distribution shape and summary statistics.
When should I use a violin plot instead of a box plot?
Use a violin plot when you want to show the full distribution shape, including multimodality, skewness, and density. Use a box plot when you only need summary statistics (median, quartiles, outliers). Violin plots are becoming the standard for high-resolution journals because they convey more information.
What is the best tool for making violin plots?
FigureGuild is ideal for publication-ready violin plots. It auto-calculates density curves, draws the violin shape, and applies journal formatting. R (ggplot2 with geom_violin) and Python (seaborn) are also used but require coding. GraphPad Prism does not support violin plots natively.
Should violin plots show individual data points?
Yes, showing individual data points overlaid on violin plots is recommended by many journals. It improves transparency and helps readers assess sample size. FigureGuild supports violin plots with individual point overlays (jitter or raincloud style).
How do you interpret a violin plot?
The width of the violin at any y-value indicates the density of data at that value. Wider sections mean more data points. The narrowest points are the least common. Most violin plots also include a median line (usually a dot or horizontal line) and sometimes quartile markers inside the shape.
Related Pages
Create Violin Plots Automatically
FigureGuild auto-calculates density curves, draws violin shapes, and applies journal formatting — all from your raw data.
Try FigureGuild Free