graph_tool.draw#

This module contains functions for graph drawing and layout.

Layout algorithms#

sfdp_layout

Obtain the SFDP spring-block layout of the graph.

fruchterman_reingold_layout

Calculate the Fruchterman-Reingold spring-block layout of the graph.

arf_layout

Calculate the ARF spring-block layout of the graph.

radial_tree_layout

Computes a radial layout of the graph according to the minimum spanning tree centered at the root vertex.

planar_layout

Performs a canonical layout of a planar graph.

random_layout

Performs a random layout of the graph.

Graph drawing#

graph_draw

Draw a graph to screen or to a file using cairo.

draw_hierarchy

Draw a nested block model state in a circular hierarchy layout with edge bundling.

graphviz_draw

Draw a graph using graphviz.

prop_to_size

Convert property map values to be more useful as a vertex size, or edge width.

get_hierarchy_control_points

Return the Bézier spline control points for the edges in g, given the hierarchical structure encoded in graph t.

Low-level graph drawing#

cairo_draw

Draw a graph to a cairo context.

interactive_window

Display an interactive GTK+ window containing the given graph.

GraphWidget

Interactive GTK+ widget displaying a given graph.

GraphWindow

Interactive GTK+ window containing a GraphWidget.