Skip to main content
100%

Reusable Scatter Plot with Iris Data

✓ Published0🌍 Public
Ggopiganta
Last edited Mar 27, 2022
Created on Mar 27, 2022

This reusable D3 scatter plot visualizes the Iris dataset, mapping petal length and width on the x- and y-axes while coloring each point by species (green for setosa, purple for versicolor, red for virginica). The code loads CSV data via `d3.csv`, uses `d3.scaleLinear` for axes, and renders circles as SVG marks. It also applies `d3.axisLeft` and `d3.axisBottom` for labeled scales, with axes and text styled via CSS. The plot is fully responsive, sizing to the browser window.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.

MIT Licensed

Similar vizzes