Skip to main content
100%

Scatter Plot with Menus

✓ Published1🌍 Public
MMyCode
Last edited Apr 15, 2019
Created on Apr 15, 2019

This interactive scatter plot uses D3 v5 to visualize the Auto MPG dataset from the UCI Machine Learning Repository. Two dropdown menus allow users to select which numeric columns map to the X and Y axes, with the plot updating through D3’s `scaleLinear`, `axisBottom`, and `axisLeft` APIs. SVG circles represent individual cars, animating to their new positions over two seconds via `transition().duration(2000)` and staggered delays. The code demonstrates reusable functions for the dropdown menu and the scatter plot, with axis labels dynamically reflecting the selected columns.

AI-generated description

This scatter plot shows data about cars, from UCI Machine Learning Repository: Auto MPG Data Set. The user can select which columns map to X and Y using dropdown menus.

MIT Licensed

Similar vizzes