Skip to main content
100%

Scatter Plot with gradient mask

✓ Published2🌍 Public
GGiuliaPassoni
Last edited May 3, 2023
Created on Apr 3, 2023

A full-screen scatter plot displays 2,000 random points individually as white circles, revealing a large red-to-blue linear gradient only through the circular gaps. The random point coordinates are generated with a custom `generateRandomPoints` function. The code applies the gradient to a single circle, then defines an SVG `<mask>` containing the white point circles to cut the gradient shape, demonstrating mask-based data visualization with d3 v6.

AI-generated description

Testing scatter plot masks.

MIT Licensed

Similar vizzes