interactive_window

interactive_window#

graph_tool.draw.interactive_window(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None, nodesfirst=False, geometry=(500, 400), update_layout=True, sync=True, main=True, window=None, return_window=False, **kwargs)[source]#

Display an interactive GTK+ window containing the given graph.

Parameters:
gGraph

Graph to be drawn.

posVertexPropertyMap (optional, default: None)

Vector-valued vertex property map containing the x and y coordinates of the vertices. If not given, it will be computed using sfdp_layout().

vpropsdict (optional, default: None)

Dictionary with the vertex properties. Individual properties may also be given via the vertex_<prop-name> parameters, where <prop-name> is the name of the property.

epropsdict (optional, default: None)

Dictionary with the edge properties. Individual properties may also be given via the edge_<prop-name> parameters, where <prop-name> is the name of the property.

vorderVertexPropertyMap (optional, default: None)

If provided, defines the relative order in which the vertices are drawn.

eorderEdgePropertyMap (optional, default: None)

If provided, defines the relative order in which the edges are drawn.

nodesfirstbool (optional, default: False)

If True, the vertices are drawn first, otherwise the edges are.

geometrytuple (optional, default: (500, 400))

Window geometry.

update_layoutbool (optional, default: True)

If True, the layout will be updated dynamically.

mainbool (optional, default: True)

If False, the GTK+ main loop will not be called.

windowGraphWindow (optional, default: None)

If provided, specifies the window where the drawing will occur. Otherwise a new one will be created.

return_windowbool (optional, default: False)

If True, the GTK+ window will be returned.

**kwargs

Any extra parameters are passed to GraphWindow, GraphWidget and cairo_draw().

Returns:
posVertexPropertyMap

Vector vertex property map with the x and y coordinates of the vertices.

selectedVertexPropertyMap (optional, only if output is None)

Boolean-valued vertex property map marking the vertices which were selected interactively.

Notes

See documentation of GraphWidget for key bindings information.