Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Cars Scatter Plot

Public visualization

Viewing a saved revision (read-only)

17f007fcda624e67975d0f1c0c5b6fee

Cars Scatter Plot

0 stars2๐ŸŒ Public
MMauradion
Last edited May 11, 2021
Created on May 11, 2021

A scatter plot displays the relationship between horsepower and weight for cars from the auto-mpg dataset, with each point representing a vehicle. The visualization uses D3 v5's `scaleLinear`, `axisBottom`, and `axisLeft` to map the quantitative variables and render axes with gridlines. Red semi-transparent circles are positioned using `xScale` and `yScale` based on the data's extent, while SVG text elements label the axes and title. The code loads data via `csv` from a remote URL and applies `nice()` to round the scale domains.

AI-generated description