Distribution
Rug plot
Marks individual values as ticks, often beside a density or scatterplot.
- Plot
- Distribution
- Data density
What it answers
Where are individual numeric observations located?
- Shape
- Short ticks along an axis
- What it shows
- Sample locations, gaps and repeated values.
Example
The question
Where exactly do the individual invoice amounts fall?
Invoice amounts, one tick per invoice (rug plot, illustrative)
Illustrative data. It belongs to no company.
When to use it
Use it when
Adding raw-observation context to another plot.
Avoid it when
When dense ticks merge into an unreadable band.
How to read it
Read each tick's position along the value axis.
The data you need
- Layout
- Long table
- Fields
- Value: number
- One row is
- One raw numeric observation. What is the grain?
- Rules
- Use raw observations unless the chosen renderer explicitly accepts summaries or bins. Define missing-value treatment.
- Optional
- Optional frequency Weight. Pre-binned alternative: BinStart,BinEnd,Count; do not treat counts as raw values.
- 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.
Worked example
Values 10,12,12,18,23. Put ticks on the axis. The two ticks at 12 may overlap; explain the duplicate.
| Value |
|---|
| 10 |
| 12 |
| 12 |
| 18 |
| 23 |
