Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Miles per Gallon vs Horsepower

Public visualization

Miles per Gallon vs Horsepower

0 stars0๐ŸŒ Public
NNanditha Reddy
Last edited Mar 20, 2024
Created on Mar 19, 2024
Forked from HTML Starter

This scatter plot visualizes the relationship between miles per gallon and horsepower for 32 car models, revealing a clear negative correlation. The visualization uses D3.js v7 with SVG rendering, scaling data from the mtcars dataset via a CSV file. The code employs `d3.csv` for data loading, `scaleLinear` for both axes, and `axisLeft` and `axisBottom` for ticks. Circles are positioned using the computed scales, with axis labels added to clarify the quantitative values shown.

AI-generated description

Scatter plot

Comments

Sign in to join the discussion.

MIT Licensed