Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Untitled

Public visualization

Viewing a saved revision (read-only)

8e7391cfa7e8486eb298a987e04c9bc4

Untitled

0 stars0🌍 Public
Aanduskong
Last edited Dec 17, 2020
Created on Dec 16, 2020

This example demonstrates a dynamic heatmap visualization that maps a function across a two-dimensional grid. The code uses D3.js to create an SVG container, define scales, axes, and draw the heatmap by rendering pixel data onto a Canvas element via a foreignObject. The Canvas `createImageData` API is used to compute and display color values based on the linear mapping function, with opacity halved for transparency. The visualization updates interactively through inputs like sliders and checkboxes, which control the model parameters.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.