Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Scatter Plot with Shape

Public visualization

Viewing a saved revision (read-only)

13ff52f236a446c48b8b97f5abf90f06

Fork of Fork of Scatter Plot with Shape

0 stars0🌍 Public
LLakshmi Keerthi
Last edited Apr 10, 2024
Created on Apr 10, 2024

This example visualizes the Iris dataset as a scatter plot of sepal length against petal length, with each point’s symbol shape encoding the flower’s species. It uses D3 v7’s `scaleLinear` for axes, `scaleOrdinal` plus `symbolsFill` to map species to differing symbol shapes, and `symbol().size(200)` to render point marks. A shape legend, built with a custom `shapeLegend` function, lists species names alongside their corresponding symbols. The plot is rendered into an SVG sized to the window, with axes and labels created via D3’s `axisLeft` and `axisBottom`.

AI-generated description