Skip to main content
100%

Making a Scatterplot with D3

✓ Published0🌍 Public
AAloysius
Last edited Feb 27, 2020
Created on Feb 27, 2020

This example visualizes the relationship between acceleration and horsepower for cars using a scatterplot rendered as SVG. The code loads an auto-mpg CSV dataset via d3.csv, converts numeric fields, and scales the data with d3.scaleLinear. Axes are generated using d3.axisLeft and d3.axisBottom, with grid lines created by setting tickSize. The plot includes labeled axes, a title, and orange semi-transparent circles positioned using xScale and yScale based on each car’s acceleration and horsepower values.

AI-generated description

This scatterplot how Acceleration is in relation to Horsepower, based on a cars dataset.

MIT Licensed

Similar vizzes