SNS Boxplot
Distributions by Category, in One Node — Median, Quartiles, Outliers
- dataframe
- IMAGE
A bar chart tells you the average; a boxplot tells you the whole story - median, quartiles, spread, and the outliers that a mean happily hides. SNS Boxplot gives you that from a DataFrame in one node: give it a category column and a value column, get back a boxplot image you can save or preview.
It's the distribution chart of the pack, and it's the one you reach for when the question isn't "what's the average price" but "how much do prices vary by category."
How it works
It's a thin wrapper around Seaborn's boxplot. In the common two-column form, the first column holds categories and the second holds the numeric values - the author's example is apple and banana prices, with Fruit as the category and Price as the value, producing one box per fruit. If you leave category_column_name blank, you get a single boxplot of the value column instead - handy for a quick look at one column's distribution.
One structural catch worth planning around: the node expects tidy data (one row per observation with a category column). If your table is wide - one column per category - you need to reshape it first, and the author points at the pack's Pandas Melt node for exactly that. Melt the wide columns into a variable/value pair, then feed the boxplot.
Inputs and outputs
dataframe- your data.category_column_name- the category column; blank for a single boxplot.value_column_name- the numeric column.title,style,palette- title and Seaborn theme.
Output: one IMAGE.
Install
Ships in HowToSD/ComfyUI-Data-Analysis. Manager: search "Data analysis" in the Custom Node Manager, install, restart, reload the browser tab. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
mv ComfyUI-Data-Analysis data-analysis # README: example workflows expect this folder name
pip install -r requirements.txt
Requires seaborn, matplotlib and pandas (Manager installs them automatically).
Common issues
Column validation is strict - typos in either column name raise. The tidy-data requirement is the real trap: feed it a wide table with categories as columns and you'll get wrong or confusing output, so melt first. Also, only one category dimension is supported here; if you want nested groups, you're beyond this node. And like the other SNS nodes, invalid style or palette names error at runtime - stick to documented Seaborn names like "darkgrid" / "muted". If your value column has strings or missing data, boxplots will complain or silently behave oddly, so clean the column first.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| category_column_name | STRING | — | |
| value_column_name | STRING | — | |
| title | STRING | — | |
| style | STRING | — | |
| palette | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |