Untitled
This example presents an interactive scatterplot of the classic Iris dataset, allowing users to compare any two of the four measured flower features by selecting the x- and y-axes from dropdown menus. It uses D3 v5 to render an SVG with semi-transparent circles for each flower, color-coded by species (setosa, versicolor, virginica) and accompanied by a legend. The code demonstrates reusable D3 components, such as a drop-down menu factory and dynamically rendered axes, with all elements re-rendered when a new variable is chosen.