sinaViolinBoxPlot
Version 1.0.0 (5.26 KB) by
Nicolas Liaudet
- Combined Sina, Violin, and Box plot with stats panel
sinaViolinBoxPlot is a versatile MATLAB function for visualizing grouped data distributions. It combines the strengths of three common plot types:
- Violin plots using KDE for smooth density estimation
- Sina plots for jittered scatter points proportional to local density
- Box plots showing Q1-Q3, median, and optional mean
The function also provides an automatic statistics panel for each category, showing key descriptive statistics in a compact, readable format. It is designed to handle large datasets efficiently, works within subplots or tiled layouts, and allows fine-tuned control over colors, transparency, marker styles, and widths.
Key Features:
- Combine violin, Sina, and box plots in a single plot
- Optional mean, median, and Q1-Q3 display
- KDE-based density estimation with adjustable bandwidth
- Scatter jitter methods: density-based, uniform, or none
- Fully customizable color, transparency, and line properties
- Stats panel per group showing n, mean, stdev, median, quartiles, min, max
- Compatible with subplots and tiled layouts
- Handles empty categories gracefully
- Suitable for large datasets (>1e5 points)
Example Use Case:
Visualize four distinct distributions simultaneously: uniform, Gaussian, Poisson, and bimodal, with clear statistical summaries and density-based scatter points.
Cite As
Nicolas Liaudet (2025). sinaViolinBoxPlot (https://www.mathworks.com/matlabcentral/fileexchange/182741-sinaviolinboxplot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2026a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
