Skip to main content
Public

Share visualization

Loading preview…

Reusable Scatter Plot (Car Engine)

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 (Car Engine)

0
PP Manisha
Last edited Oct 26, 2025
Created on Oct 26, 2025

This scatter plot visualizes the relationship between engine size and fuel efficiency (MPG) using a dataset of car engines. The visualization shows individual data points as blue circles, with clear axis labels displaying the measured variables. Built with D3.js (v7), the implementation uses `d3.csv` to load data from a GitHub-hosted CSV file, `d3.scaleLinear` for axis scaling, and `d3.axisLeft` and `d3.axisBottom` to render the chart axes. The SVG-based rendering is encapsulated in a reusable `ScatterPlot` function that accepts configurable dimensions, margins, and data value accessors, allowing for flexible reuse across different datasets.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed