This page demonstrates distribution visualization combining histogram, box plot, and rug plot.
Single distribution: Basic histogram + box plot + rug plot
Group comparison: Compare distributions across multiple groups
Interactive filters: Multi-select dropdown controls for categorical and numeric variables
Customization: Toggle histogram, box, and rug plot visibility
Use multi-select dropdown controls to filter and explore the data!
Simple Distribution Plot
Basic distribution showing histogram, box plot, and rug plot for a normal distribution
Plot Attributes
Axes
value
0.6(0.25 - 2.5)
30
Data: df1
Treatment Effect Comparison
Compare distributions across different treatment groups using color_cols
Plot Attributes
Axes
value
0.6(0.25 - 2.5)
30
Data: df2
Score Distribution with Interactive Filters
Use age and department filters to filter data dynamically
Filters
18 - 80
Plot Attributes
Axes
score
0.6(0.25 - 2.5)
40
Data: df3
Example 3b: Distribution with Single-Select Choice
This example demonstrates the difference between choices and filters:
- **department (choice)**: Single-select dropdown - pick exactly ONE department
- **age (filter)**: Multi-select dropdown - can select multiple age values
Use choices when the user must select exactly one option.
Filters
18 - 80
Plot Attributes
Axes
score
0.6(0.25 - 2.5)
40
Data: df3
Multi-Variable Distribution with Dropdowns
Select different variables and grouping columns using the dropdowns above. This example demonstrates the full flexibility of the DistPlot.
This example demonstrates custom color mapping using ColorColSpec. Each team has a specific color assigned via a Dict.
Plot Attributes
Axes
score
0.6(0.25 - 2.5)
25
Data: df6_custom
Date/Time Filtering Test
This example tests continuous range filters for Date, DateTime, ZonedDateTime, and Time columns. All temporal types use range sliders for intuitive filtering. Try adjusting the range sliders to filter the data!
Filters
00:10:00 - 16:40:00
2024-01-01T01:00:00 - 2024-01-05T04:00:00
2024-01-02 - 2024-04-10
2024-01-01T01:00:00 - 2024-01-05T04:00:00
Plot Attributes
Axes
value
0.6(0.25 - 2.5)
30
Data: df7
Date/Time Range Slider Filters Test
This example tests range slider filters for Date, DateTime, ZonedDateTime, and Time columns. All temporal types use range sliders regardless of the number of unique values, providing a consistent filtering experience.
Filters
2024-01-01T02:00:00 - 2024-01-01T20:00:00
2024-01-01T02:00:00 - 2024-01-01T20:00:00
2024-01-02 - 2024-01-11
01:00:00 - 10:00:00
Plot Attributes
Axes
value
0.6(0.25 - 2.5)
30
Data: df8
Struct Data Source Example
This distribution plot uses data from a struct containing multiple DataFrames.
The SurveyData struct holds both responses and demographics.
Charts reference the responses DataFrame using Symbol("survey.responses").
Survey Results from Struct Data Source
This example shows how to use a struct as a data source. The SurveyData struct contains responses and demographics DataFrames. Access struct fields via dot notation.
Plot Attributes
Axes
0.6(0.25 - 2.5)
30
Data: survey.responses
Key Features Summary
Three-in-one visualization: Histogram, box plot, and rug plot combined
Group comparison: Overlay distributions for different groups with color coding
Interactive filtering: Multi-select dropdown filters for both numeric and categorical columns
Customization options: Control visibility and appearance of each component
Statistical insight: See shape, central tendency, spread, and outliers at once
Tip: The rug plot (tick marks at the bottom) shows individual data points!