Programmatically generate SVG (vector) images, animations, and interactive Jupyter widgets
1<?xml version="1.0" encoding="UTF-8"?> 2<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 3 width="600" height="200" viewBox="0 0 300 100"> 4<defs> 5<g fill="orange" transform="rotate(-20)" id="d0"> 6<rect x="0" y="10" width="20" height="40" /> 7<circle cx="30" cy="40" r="10" /> 8<circle cx="50" cy="40" r="10" fill="green" /> 9</g> 10</defs> 11<use xlink:href="#d0" /> 12<use xlink:href="#d0" x="80" y="0" stroke="black" stroke-width="1" /> 13<use xlink:href="#d0" x="80" y="20" stroke="blue" stroke-width="2" /> 14<use xlink:href="#d0" x="80" y="40" stroke="red" stroke-width="3" /> 15</svg>