Skip to main content
100%

Vega-Lite API - scatter plot

✓ Published1🌍 Public
Kkatjur01
Last edited Apr 24, 2023
Created on Apr 24, 2023

This example demonstrates a scatter plot of vehicle data using the Vega-Lite API, showing the relationship between miles per gallon and horsepower across different car origins, with point size encoding weight and tooltips displaying car names. The visualization leverages `vl.markCircle` with opacity for density perception, and custom scales that avoid zero-based axes. It loads CSV data from a GitHub gist via d3.csv, then renders to SVG using Vega and Vega-Lite with a dark-on-light custom config. The code registers vega-tooltip for interactive hover labels and uses d3.v5.

AI-generated description

A visualization constructed using the vega-lite-api.

MIT Licensed

Similar vizzes