Skip to main content
100%

Activity6_ Tutorial 3.2 : Scatter plot with shape

✓ Published2🌍 Public
Jjayanthbalina@gmail.com
Last edited Apr 5, 2024
Created on Apr 3, 2024

This example displays a scatter plot of the Iris dataset, mapping sepal length on the x-axis and petal length on the y-axis. The species of each flower is encoded using different point shapes, with a legend positioned at the coordinates (850, 320) identifying each species. The visualization uses D3 v7's `scaleLinear` and `scaleOrdinal` APIs to map data values to coordinates and shapes, with the `symbolsFill` array providing the distinct point markers. The axes are generated using `axisLeft` and `axisBottom`, while the legend is built using D3's `symbol` generator. Data is loaded asynchronously from a remote CSV file and parsed using `csvParse`.

AI-generated description
MIT Licensed

Similar vizzes