Skip to main content
100%

Scatter plot

✓ Published2🌍 Public
JJames Malvern
Last edited Mar 5, 2021
Created on Mar 3, 2021
Forked from customising axes

This scatter plot visualizes the relationship between horsepower and model year for automobile data loaded from an external CSV file. The code uses D3 v5’s `csv` method to fetch the dataset, then applies `scaleLinear`, `axisBottom`, and `axisLeft` to construct the axes on an SVG renderer. Circular marks are appended via `selectAll` and `enter` to display each data point, with gridlines generated by tick sizes. A title and axis labels are added using SVG `text` elements.

AI-generated description

This scatter plot is an example of how to use external data sources using the CSV method from D3.js.

MIT Licensed

Similar vizzes