Scatter Plot with Color Legend
✓ Published1🌍 Public
PPhronesis
Last edited Nov 22, 2021
Created on Nov 22, 2021
Forked from Polished Stylized Scatter Plot with Menus
A React-driven scatter plot visualizes the iris dataset, displaying four numeric attributes as selectable X and Y axes via dropdown menus. Each circle represents a flower, colored by species through a legend using `scaleOrdinal`. The SVG rendering uses `d3.scaleLinear` and `d3.extent` for axes, with React state managing the attribute selection. The code imports `csv` from D3 v5, uses React hooks like `useState` and `useEffect`, and custom components like `AxisBottom`, `AxisLeft`, `Marks`, and `ColorLegend` structure the visualization. A tooltip reveals exact values on hover.
AI-generated descriptionA stylized scatter plot of the famous iris data set, using React to create menus and interactivity.
MIT Licensed