as_svg() draws a graph to a standalone SVG string using the same geometry
as plot.igraph(), but emits per-vertex <g id="vertex-N"> groups with
<title> tooltips (and per-edge groups), giving lightweight interactivity
(hover) with no JavaScript. It accepts the usual plotting parameters via
....
Arguments
- graph
The graph to plot.
- ...
Plotting parameters passed to
plot.igraph().- file
Optional path to write the SVG to. If
NULL(default) the SVG string is returned invisibly.- width, height
Size in inches (the SVG is
width*72xheight*72px).- tooltips
Optional vertex attribute name to use for the
<title>tooltips; defaults to the vertexnameattribute (or vertex index).
Details
Vertices, edges (all styles, with their line types), arrowheads, labels
(with their font family and face), mark groups, pie shapes and the legends
of scale_vertex_color() and friends are rendered; sphere/raster vertex
shapes are drawn as a placeholder box in this version. Axes, titles and
frames are not included.
