Scatter Plot with Shape
✓ Published0🌍 Public
This scatter plot visualizes health expenditure data from a CSV file, showing expenditure by year and colored by gender. The visualization uses a D3.js v7 scatter plot with a shape legend to distinguish between male and female data points. The code leverages `d3.scaleLinear` for axes, `d3.scaleOrdinal` and `d3.symbolsFill` for shapes, and `d3.symbol` to generate the point markers. A custom `axes` module handles axis rendering with labels, while the `shapeLegend` module displays the gender categories. The plot loads data asynchronously via the `fetch` API and `d3.csvParse`.
AI-generated descriptionA scatter plot of the Iris Dataset with a color legend.
See also:
MIT Licensed