🌍 Public
Viewing a saved revision (read-only)
8c2fe273f3df4d9f86f6885b8188da9a
Scatter Plot with Color
This example builds an interactive scatter plot of the Iris dataset, mapping sepal length to the x-axis and petal length to the y-axis. Each point is colored by its species, with a color legend identifying the three categories. The visualization is rendered using D3.js, leveraging `scaleLinear` for axes, `scaleOrdinal` with `schemeCategory10` for categorical colors, and an `axisLeft`/`axisBottom` pair for the plot frame. A custom `colorLegend` function adds the species key.
AI-generated description