Skip to main content
100%

D3 Scatterplot V - transitions

✓ Published1🌍 Public
MMarvin Frede
Last edited Oct 2, 2023
Created on Oct 2, 2023

This example demonstrates animated transitions in a D3.js scatterplot using the Iris flower dataset. Every two seconds, the plot cycles through different measurements—sepal length, sepal width, petal length, and petal width—as the x-axis value, causing circles to smoothly relocate with d3.transition over 500 milliseconds. The reusable scatterPlot function employs d3.scaleLinear for both x and y axes, dynamically updating domains and ranges as data mappings change, with d3.axisBottom and d3.axisLeft rendering the axis labels.

AI-generated description

Learning about

  • scaleLinear (and some other scale types)
  • domain
  • range
MIT Licensed

Similar vizzes