Skip to main content
100%

Creating a Scatter Plot with D3.js

✓ Published0🌍 Public
LLakshmiManjushaReddyYarreddu
Last edited Mar 8, 2023
Created on Mar 8, 2023

This example visualizes the Iris flower dataset as a scatter plot of petal length against petal width, with each point colored by species. It loads the data from a CSV file using d3.csv and maps values to screen coordinates with d3.scaleLinear and d3.extent. The SVG circles are rendered via d3.select, and axes are generated with d3.axisLeft and d3.axisBottom. The code runs as a React example with D3 v6, using an HTML page that appends an SVG to the body and sets the chart dimensions to the full window size.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes