Write to SVG using diagrams