Skip to main content
Public

Share visualization

Loading preview…

Let's Make A Face

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

Let's Make A Face

1
Mmuddcohd
Last edited May 17, 2022
Created on May 17, 2022

A cartoon face is drawn entirely with SVG shapes, using a yellow circle for the head, black circles for eyes, and a curved path for the mouth created with the D3 `arc` generator. The code uses D3 v7 selections to append elements to an SVG canvas, with explicit attribute setters like `.attr('cx', ...)` and `.attr('d', ...)` to position the eyes and compute the mouth's arc geometry. Elements are grouped in a `<g>` element translated to the canvas center.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed