Skip to main content
100%

Re-doing Reusable Scatterplot 101

✓ Published1🌍 Public
AAlex
Last edited Apr 10, 2023
Created on Apr 7, 2023
Forked from Scatterplot 101

This example visualizes the Iris dataset as a scatterplot, encoding petal width on the x-axis and sepal length on the y-axis. It demonstrates a refactored version of a reusable chart module, building on an earlier commented-out implementation. The code uses D3 v7 APIs including `d3.csv` for data loading, `scaleLinear`, `extent`, `axisBottom`, `axisLeft`, and selection joins to render SVG circles. The final chart is assembled through a custom `scatterPlot` function configured with width, height, margin, and radius, then invoked on an SVG element.

AI-generated description
MIT Licensed

Similar vizzes