Menu

Tutorial7 min read

How to Make a Violin Plot in Excel (And Why You Shouldn't)

By Francesco Villasmunta
How to Make a Violin Plot in Excel (And Why You Shouldn't)

Excel does not have a native violin plot. You can fake one with a 6-step KDE workaround - but it takes 20+ minutes and the result is fragile. Here is the workaround, and then the 30-second Python alternative.

In This Article

0.Live Code: A Proper Violin Plot

1.The Excel Workaround (6 Steps)

2.Why It Is Not Worth It

3.The 30-Second Alternative

4.When to Use Violin Plots

0. Live Code: A Proper Violin Plot

This is what a real violin plot looks like: KDE-smoothed distributions, overlaid box plots, individual data points, and a bimodal distribution that Excel simply cannot show. Edit the code to try your own data.

Live Code Editor
Code EditorPython
Loading editor...
Live Preview

Preparing preview

Running once automatically on first load

Learn by Experimenting

This is a safe playground for learning! Try changing:

  • Colors: Modify color values to see different palettes
  • Numbers: Adjust sizes, positions, or data ranges
  • Labels: Update titles, axis names, or legends

Edit the code, run it, then open the full data visualization tool to continue with your own dataset.

1. The Excel Workaround (6 Steps)

If you must use Excel, here is the workaround. It creates a mirrored area chart that approximates a violin shape using kernel density estimation you calculate manually.

1

Calculate KDE

Create a column of evenly spaced y-values. For each, count nearby data points using NORM.DIST to approximate kernel density.

2

Mirror the density

Create a negative copy of your KDE column. This gives the symmetric violin shape when plotted as area.

3

Create area chart

Select the y-values and both KDE columns. Insert a stacked area chart.

4

Switch axes

Swap X and Y axes so the violin is vertical. This requires editing the chart data series manually.

5

Remove fills

Make the bottom area transparent and color only the top area. Remove gridlines and chart borders.

6

Repeat per group

Do all of the above for each group in your data. Then manually align the charts side by side.

2. Why It Is Not Worth It

Try it

Try it now: compare your groups with the right chart

Generate box, violin, or bar charts directly from your dataset and choose the clearest visual for your paper.

Generate comparison charts

Newsletter

Get a weekly Python plotting tip

One concise tip each week for cleaner, faster scientific figures. Built for researchers who publish.

No spam. Unsubscribe anytime.

20+ Minutes Per Group

Each additional group means repeating all 6 steps.

No KDE Built In

You manually approximate kernel density with formulas.

No Data Points Overlay

Cannot add individual observations or box plot statistics.

Breaks on Data Changes

Update data and your chart formulas need manual fixing.

3. The 30-Second Alternative

Upload Your CSV

Drag and drop your Excel data file.

Type: 'Make a violin plot'

AI generates the complete Python code.

Edit if Needed

Customize colors, labels, overlays in the code editor.

Export at 600 DPI

Download TIFF/PNG/PDF for journal submission.

Key Advantage

Unlike Excel, Python violin plots show the actual data distribution including bimodality, skew, and outliers. Notice the bimodal "High Dose" group in the live code above - Excel's workaround completely misses this.

4. When to Use Violin Plots

Comparing distributions across groups

Showing bimodal or skewed data (bar charts hide this)

Replacing bar+error bar plots in manuscripts

Small sample sizes (n < 10)

Categorical counts or proportions

Time series data (use line charts instead)

Chart gallery

Related Chart Types

Explore alternatives to violin plots for different data scenarios.

Browse all chart types →
Violin plot comparing score distributions across 3 groups with inner box plots
Distributionseaborn, matplotlib
From the chart galleryComparing treatment effects across groups

Violin Plot

Combines box plots with kernel density to show distribution shape across groups.

Sample code / prompt

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
from scipy.stats import f_oneway

# Generate exam score data for 3 groups
np.random.seed(42)
control = np.random.normal(72, 12, 50)
treatment_a = np.random.normal(78, 10, 50)
Box and whisker plot comparing gene expression across 4 genotypes with significance brackets
Distributionseaborn, matplotlib
From the chart galleryComparing experimental groups in scientific research

Box and Whisker Plot

Displays data distribution using quartiles, median, and outliers in a standardized format.

Sample code / prompt

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

# Generate gene expression data for 4 genotypes
np.random.seed(42)
genotypes = ['WT', 'KO1', 'KO2', 'Mutant']
n_per_group = 20
Histogram showing age distribution with 20 bins and KDE overlay
Distributionmatplotlib, seaborn
From the chart galleryAnalyzing age demographics

Histogram

Displays the distribution of numerical data by grouping values into bins.

Sample code / prompt

import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import gaussian_kde, skewnorm

# Generate age data with slight right skew
np.random.seed(42)
ages = skewnorm.rvs(a=2, loc=42, scale=15, size=500)
ages = np.clip(ages, 18, 80)  # Clip to realistic range

fig, ax = plt.subplots(figsize=(12, 7))
Bar chart comparing average scores across 5 groups with error bars
Comparisonmatplotlib, seaborn
From the chart galleryComparing performance across categories

Bar Chart

Compares categorical data using rectangular bars with heights proportional to values.

Sample code / prompt

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

# Generate performance scores for 5 treatment groups
np.random.seed(42)
groups = ['Control', 'Treatment A', 'Treatment B', 'Treatment C', 'Treatment D']
n_samples = 30
Scatter plot of height vs weight colored by gender with regression line
Statisticalmatplotlib, seaborn
From the chart galleryCorrelation analysis between metrics

Scatterplot

Displays values for two variables as points on a Cartesian coordinate system.

Sample code / prompt

import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
import pandas as pd

# Generate sample data
np.random.seed(42)
n_samples = 200
height = np.random.normal(170, 8, n_samples)
weight = height * 0.6 + np.random.normal(0, 8, n_samples) - 50

Frequently Asked Questions

Does Excel have a built-in violin plot chart type?
No. As of Excel 365 (2026), there is no native violin plot option. The closest built-in chart types are box plots (added in Excel 2016) and histograms. Creating a violin plot in Excel requires a manual 6-step workaround using kernel density estimation calculated in helper columns.
When should I use a violin plot instead of a box plot?
Use a violin plot when you need to see the full distribution shape of your data - especially for bimodal or multimodal distributions that a box plot would hide. Box plots are better for quick comparisons of medians and quartiles. Many researchers overlay both: the violin shows the density shape while a thin box plot inside shows the quartiles.
What is the fastest way to create a violin plot for a research paper?
The fastest approach is to use a dedicated tool: in Python, seaborn.violinplot() creates one in two lines of code. In R, ggplot2's geom_violin() works similarly. Online tools like Plotivy let you upload a CSV and type 'violin plot' to get a publication-ready figure in about 30 seconds, with no coding required.
Can I make a violin plot in Google Sheets?
Google Sheets has no native violin plot either. The same KDE workaround that works in Excel can theoretically be adapted, but Google Sheets lacks some of the statistical functions needed, making it even harder. Use Python, R, or an online tool like Plotivy instead.
What DPI should I export my violin plot at for a journal?
Most journals require 300 DPI minimum for raster images. Export at 600 DPI for safety. If your tool supports vector export (PDF or SVG), use that instead - vector formats scale to any size without quality loss and are preferred by journals like Nature, Science, and Cell.

Make Violin Plots Without Excel

Upload your data, type "violin plot", and get a publication-ready figure in 30 seconds.

Tags:#excel#violin plot#data visualization#tutorial#matplotlib#statistics#how to make a violin plot in excel

Found this helpful? Share it with your network.

FV
Francesco Villasmunta

Experimental Physicist & Photonics Researcher

Hands-on experience in silicon photonics, semiconductor fabrication (DRIE/ICP-RIE), optical simulation, and data-driven analysis. Built Plotivy to help researchers focus on discoveries instead of data struggles.

More about the author

Visualize your own data

Apply the techniques from this article to your own datasets. Upload CSV, Excel, or paste data directly.

Start Analyzing - Free