question 3
✓ Published0🌍 Public
A scatter plot visualizes car dataset attributes, plotting horsepower on the x-axis against highway MPG on the y-axis, with each point colored by car make. It loads data from a remote CSV via `d3.csv`, then uses `d3.scaleLinear` for axes and `d3.scaleOrdinal` with `schemeTableau10` for the categorical color legend. Axes are rendered with `d3.axisLeft` and `d3.axisBottom` in SVG, and circles are joined to the data using `selectAll().data().join()`. The chart is fully responsive, sizing to window dimensions.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed