Reusable D3 Scatter Plot (Different Plot shape)
✓ Published0🌍 Public
This example demonstrates a reusable D3 scatter plot that visualizes the Iris dataset, with different symbol shapes representing different species. The plot maps petal length to the x-axis and sepal length to the y-axis, using axes generated with d3.axisLeft and d3.axisBottom. The reusable component pattern, built with a custom scatterPlot() factory function, employs d3.scaleLinear for positioning, d3.scaleOrdinal with d3.symbols for shape encoding, and d3.symbol to generate SVG paths. Data is loaded asynchronously via d3.csv from a remote GitHub gist.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed