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

1
Uubl2
Last edited Mar 28, 2022
Created on Mar 22, 2022

A reusable scatter plot animates through the Iris dataset, cycling the x-axis among four measurements every two seconds. Built with D3 v6, it uses `scaleLinear`, `extent`, and `axisBottom`/`axisLeft` to render axes, while a custom `scatterPlot` function manages the plot’s width, height, margins, and radius. Circles are colored by species (setosa red, versicolor indigo, virginica orange) and sized via `rx`/`ry` attributes. The SVG updates dynamically through `setInterval`, demonstrating a modular design where the same chart is re-parameterized with different data columns.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed