Skip to main content
100%

Violin Plot + Box Plot v3

✓ Published0🌍 Public
AaiMojica10
Last edited Dec 2, 2016
Created on Dec 2, 2016

This interactive chart combines violin plots with box plots to visualize the distribution of a numeric value across multiple year categories from a CSV dataset. The SVG-based visualization, built with D3 v3, uses kernel density estimation for accurate violin shapes and supports responsive resizing. It features modular chart types including box, notched box, violin, beeswarm, bean, and trendline variants, with extensive customization options for components like median lines, outliers, and violin resolution. The animation highlights transitions between chart types and style options, while CSS styling allows easy theme adjustments.

AI-generated description

An implementation of a reusable responsive distribution chart. Based on the concept outlined in Mike Bostocks blog post Towards Reusable Charts.

See this live on bl.ocks.org here.

Features:

  • Responsive design, chart size adjusts with screen <Open in new window to see example.>
  • Easily styled in CSS
  • Modular design supporting 3 types of charts
    • Box Plot
    • Notched Box Plot
    • Violin Plot
    • Beeswarm Plot
    • Bean Plot
    • Trendlines
  • Each chart type supports multiple options and styles such as
    • Box width
    • Show/Hide any component (median line, mean line, whiskers outliers, etc...)
    • Scatter Outliers
    • Notch style (traditional angled vs 90 degree cutouts)
    • Violin resolution and interpolation
    • Scatter style (random vs organized beeswarm)

Updated in V3:

  • Support for clamping the ViolinPlot or forcing it to extend beyond the normal range to create a closed Violin
  • New option to adjust the number of y axis ticks
  • Now uses Kernel Density Estimation intstead of histogram interpolation for more accurate violin plots.

Previous version: Reusable Violin + Box Plot V2

forked from <a href='http://bl.ocks.org/asielen/'>asielen</a>'s block: <a href='http://bl.ocks.org/asielen/92929960988a8935d907e39e60ea8417'>Violin Plot + Box Plot v3</a>

mit Licensed

Similar vizzes