Skip to main content
Public

Share visualization

Loading preview…

Reusable Scatter Plot

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Reusable Scatter Plot

0
Nnikhilagopi
Last edited Mar 29, 2023
Created on Mar 27, 2023

A reusable scatter plot displays the Iris dataset, cycling through different x-axis attributes every two seconds to reveal patterns across petal and sepal measurements. Circles are colored by species (setosa, versicolor, virginica) and sized according to sepal dimensions. Built with d3.js v6, it demonstrates a modular `scatterPlot` function using `scaleLinear`, `axisLeft`, `axisBottom`, and SVG circle elements, with data fetched from a GitHub Gist. The animation uses `setInterval` to update the plot, while axes and marks redraw dynamically.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed