Cars Scatter Plot
✓ Published1🌍 Public
This example visualizes the relationship between miles per gallon and horsepower for a dataset of cars from the auto-mpg CSV. Each car is represented as a steel-blue circle with a black stroke, positioned using d3.scaleLinear with d3.extent to map data domains to screen coordinates. The code renders SVG elements and includes customizable axes with tick lines and titles, built using d3.axisLeft and d3.axisBottom. The data is loaded asynchronously via d3.csv, with numeric fields coerced to numbers before rendering.
AI-generated descriptionAn example including some commonly used features of SVG.
MIT Licensed