Distribution

Stacked histogram

Shows total frequency per numeric bin and each group's contribution.

  • Plot
  • Distribution
  • Composition

What it answers

Which groups contribute to each value range?

Shape
Stacked segments within numeric bins
What it shows
Frequency and contributors by bin.

Example

The question

How are order values spread, and which channel makes up each band?

Orders by value band and channel (illustrative)

Orders by value band and channel (illustrative)Stacked bins of 20 euros. Store orders cluster at lower values (20 to 40 euros); online orders peak at 60 to 80 euros.OnlineStoresOrders02040608004080120160200Order value (EUR)
Orders by value band and channel (illustrative)Stacked bins of 20 euros. Store orders cluster at lower values (20 to 40 euros); online orders peak at 60 to 80 euros.OnlineStoresOrders02040608004080120160200Order value (EUR)
Stacked bins of 20 euros. Store orders cluster at lower values (20 to 40 euros); online orders peak at 60 to 80 euros.

Illustrative data. It belongs to no company.

When to use it

Use it when

Showing distribution and group composition together.

Avoid it when

When direct group-shape comparison is more important than total frequency.

How to read it

Read total bin height, then stacked group segments.

Note

Use the same bin edges across groups.

The data you need

Layout
Long table
Fields
Group: text; Value: number
One row is
One raw observation belonging to a group. What is the grain?
Rules
Retain individual observations and group labels. State weighting and missing-data rules.
Optional
For box plots only, some tools accept Group,Q1,Median,Q3,WhiskerLow,WhiskerHigh plus separate outliers. Other distributions usually need raw data.
Preparation
Keep raw numeric observations, group them if needed and handle missingness explicitly. Choose bins, bandwidth or summary conventions as appropriate to this specific plot.
Units
The measurement axis retains its original unit. Frequency uses observations; normalised frequency divides by group sample size; density also depends on interval width.
Example of the input layout: Long tableA long table: one row per observation, few columns. New data adds rows.GroupValueAABBC
A long table: one row per observation, few columns. New data adds rows.

Worked example

A10,12,18; B11,23. Counts below 20 total 4: A3, B1; counts 20-30 total 1 from B.

GroupValue
A10
A12
A18
B11
B23