Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Reusable Scatter Plot

Public visualization

Viewing a saved revision (read-only)

6794c631538c4b06b934004f4a5f98b2

Reusable Scatter Plot

0 stars0🌍 Public
FFande Workspace
Last edited Mar 28, 2023
Created on Mar 28, 2023
Forked from HTML Starter

This example demonstrates a reusable scatter plot that visualizes the Iris dataset, plotting sepal length against petal length for each flower variety. The chart uses D3.js v7 with SVG rendering to display circles representing individual data points, with axes scaled linearly from zero to the maximum attribute values. The implementation defines a reusable `scatterplot()` function that accepts a selector, data, and two attribute names, enabling the same visualization logic to be applied to different data fields. The JavaScript code leverages `d3.csv()` for data loading, `d3.scaleLinear()` for coordinate mapping, and D3 axis generators to create the chart.

AI-generated description

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

See also React Starter.