Ordinal Brushing
A categorical scatterplot displays a set of SVG symbols representing `d3.svg.symbolTypes` along an ordinal x-axis. Brushing horizontally across the axis selects symbols by their categorical position, highlighting them with a red stroke while unselected symbols fade. The example uses an ordinal `d3.scale.ordinal()` and `d3.svg.brush()` to map brush extents to categorical values, demonstrating selection over a non-quantitative dimension. The code also relies on `d3.svg.axis()` for the ordinal scale, and applies CSS transitions to animate fill-opacity changes.
AI-generated descriptionBrushing makes more sense for quantitative dimensions. It’s possible to use a brush to select categorical values, as shown here, though I’d recommend using per-value toggles instead. This way, users can pick arbitrary sets of values, rather than being forced to pick contiguous ranges.