Basic Scatter Plot
This scatter plot visualizes the Iris dataset, plotting sepal length against petal length for 150 flowers. The code uses D3 v4 to create SVG circles, with axes customized via `d3.axisBottom` and `d3.axisLeft`, including negative tick sizes and padding. Data is loaded from a CSV file and parsed with a row function that converts measurements to numbers. Linear scales map the data domains to the plot dimensions, with a margin-based layout for the chart area.
AI-generated descriptionPart of the video course: D3.js in Motion.
An example of creating a scatter plot with customized axes using D3.
This shows the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations. Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.