node.append("image")
.attr("xlink:href", "https://github.com/favicon.ico")
.attr("x", -8)
.attr("y", -8)
.attr("width", 16)
.attr("height", 16);
where an SVG image node is added to the DOM for every item in the data (the 'node' selection set, which is the result of a selectAll().data().enter() sequence -- you might want to read up on the data-join behaviour in D3:
http://bost.ocks.org/mike/join/ if you don't grok the code before that bit in the gist).
What the gist does is plot every node as a set of SVG objects: g, image and a text:
<g><image /><text></text></g>
Use 'Inspect Element' feature of your browser's dev tools to see this.
The circles in the plot in Mike's talk are done the same way, only this time a SVG circle node is added to the page's DOM for every node.
When you want to add an image to the circle, the way to go would be to edit the code to instead of append()-ing a single circle per node, append() a 'g'roup instead, inside which would then be placed the circle and the image.
Met vriendelijke groeten / Best regards,
Ger Hobbelt
--------------------------------------------------
web:
http://www.hobbelt.com/
http://www.hebbut.net/mail:
g...@hobbelt.commobile: +31-6-11 120 978
--------------------------------------------------