Viewing a saved revision (read-only)
254a96271ec54394ab6a18abcf7b662f
Reusable Scatter Plot Using Iris Dataset
A reusable D3.js scatter plot visualizes the Iris Dataset, encoding the three species with distinct SVG symbols (circle, plus, diamond) and colors from `schemeCategory10`. It uses `scaleLinear` for axes and `scaleOrdinal` for mapping species to shapes and colors, with the plot implemented as a reusable function with getters and setters for dimensions, data, and margins. Every ten seconds, the x-axis changes to a different flower measurement (petal width, sepal width, petal length, sepal length), dynamically updating the axes and points. Data is fetched from a GitHub gist CSV and parsed with string-to-number conversion for all numeric columns.
AI-generated descriptionA vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.