Skip to content

Instantly share code, notes, and snippets.

@intro-to-d3
Created May 20, 2016 00:43
Show Gist options
  • Save intro-to-d3/15a6ee0a42d5efa48f5f956d2a024ceb to your computer and use it in GitHub Desktop.
Save intro-to-d3/15a6ee0a42d5efa48f5f956d2a024ceb to your computer and use it in GitHub Desktop.
the g element
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SVG Example</title>
</head>
<body>
<svg width="250" height="250">
<rect x="0" y="0" width="50" height="200" fill="gray"/>
<rect x="50" y="200" width="200" height="50" fill="gray"/>
<g transform="translate(50, 0)">
<circle cx="0" cy="0" r="10"/>
<circle cx="100" cy="100" r="10"/>
<circle cx="130" cy="120" r="10"/>
<circle cx="80" cy="180" r="10"/>
<circle cx="180" cy="80" r="10"/>
<circle cx="180" cy="40" r="10"/>
</g>
</svg>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment