python-igraph API reference

List of all classes, functions and methods in python-igraph

module documentation

Undocumented

Function _write_graph_to_svg Saves the graph as an SVG (Scalable Vector Graphics) file
def _write_graph_to_svg(graph, fname, layout='auto', width=None, height=None, labels='label', colors='color', shapes='shape', vertex_size=10, edge_colors='color', edge_stroke_widths='width', font_size=16, *args, **kwds):

Saves the graph as an SVG (Scalable Vector Graphics) file

The file will be Inkscape (http://inkscape.org) compatible. In Inkscape, as nodes are rearranged, the edges auto-update.

ParametersgraphUndocumented
fnamethe name of the file or a Python file handle
layoutthe layout of the graph. Can be either an explicitly specified layout (using a list of coordinate pairs) or the name of a layout algorithm (which should refer to a method in the Graph object, but without the layout_ prefix.
widththe preferred width in pixels (default: 400)
heightthe preferred height in pixels (default: 400)
labelsthe vertex labels. Either it is the name of a vertex attribute to use, or a list explicitly specifying the labels. It can also be None.
colorsthe vertex colors. Either it is the name of a vertex attribute to use, or a list explicitly specifying the colors. A color can be anything acceptable in an SVG file.
shapesthe vertex shapes. Either it is the name of a vertex attribute to use, or a list explicitly specifying the shapes as integers. Shape 0 means hidden (nothing is drawn), shape 1 is a circle, shape 2 is a rectangle and shape 3 is a rectangle that automatically sizes to the inner text.
vertex_sizevertex size in pixels
edge_colorsthe edge colors. Either it is the name of an edge attribute to use, or a list explicitly specifying the colors. A color can be anything acceptable in an SVG file.
edge_stroke_widthsthe stroke widths of the edges. Either it is the name of an edge attribute to use, or a list explicitly specifying the stroke widths. The stroke width can be anything acceptable in an SVG file.
font_sizefont size. If it is a string, it is written into the SVG file as-is (so you can specify anything which is valid as the value of the font-size style). If it is a number, it is interpreted as pixel size and converted to the proper attribute value accordingly.
argsUndocumented
kwdsUndocumented
API Documentation for python-igraph, generated by pydoctor 21.2.2 at 2021-10-18 16:23:19.