Using d3 with Inkscape

538 views
Skip to first unread message

Chris Viau

unread,
Oct 5, 2011, 11:14:32 PM10/5/11
to d3...@googlegroups.com
I wrote a short tutorial about using Inkscape to draw SVG content, modifying it with d3, and then exporting the results back to Inkscape. I use this workflow for rapid design iteration in the prototyping phase of new visualization projects. I will be glad to receive your comments, questions and corrections.

Chris Hunter

unread,
Oct 6, 2011, 1:36:13 PM10/6/11
to d3...@googlegroups.com
Really interesting article. As someone who's come to dynamic visualizations from the art/design side, I like the idea of getting started quickly with a vision or prototype and then adding dynamic data to see if it works.

Mike Bostock

unread,
Oct 6, 2011, 4:07:26 PM10/6/11
to d3...@googlegroups.com
> http://christopheviau.com/d3_tutorial/d3_inkscape/

Excellent! I had always envisioned using D3 to manipulate SVG
generated by some other application, but now you've demonstrated the
perfect use case. I love it!

Mike

Ziggy Jonsson

unread,
Oct 6, 2011, 4:38:25 PM10/6/11
to d3-js
Excellent stuff. Using D3 with externally created SVG really opens up
new dimensions.
I'll be sharing some more stuff in the same direction, i.e. a D3 map-
tiler that can be attached to any rectangle frame. Appreciate any
help/comments to make it better.

Mike, would it be difficult for D3 to maintain an additive/
multiplicative hierarchy of transforms from the top level down to each
object? This way we could get global position (and rotation) on each
object, irrespective of earlier transforms?

Mike Bostock

unread,
Oct 6, 2011, 4:40:18 PM10/6/11
to d3...@googlegroups.com
> This way we could get global position (and rotation) on each
> object, irrespective of earlier transforms?

Take a look at getScreenCTM:

http://www.w3.org/TR/SVG/types.html#__svg__SVGLocatable__getScreenCTM

Mike

Nelson Minar

unread,
Oct 6, 2011, 5:55:47 PM10/6/11
to d3...@googlegroups.com
What a great tutorial, thanks! This reminds me, I saw a talk at FOSS4G where someone generated SVG maps in QuantumGIS, then edited them in Inkscape to look nicer. You could do something similar with D3 instead of or addition to the Inkscape editor.

Turns out vector graphics formats are powerful!

Ziggy Jonsson

unread,
Oct 7, 2011, 6:19:19 PM10/7/11
to d3-js
Thanks looks very promising. It seems that this function takes into
account the viewbox, so an additional calculation would be required
for the global coordinates. Can't exactly figure this out though.
Reply all
Reply to author
Forward
0 new messages