graph_tool.draw.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:
- g
Graph Graph to be drawn.
- pos
VertexPropertyMap(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 vertex properties. Individual properties may also be given via the
edge_<prop-name>parameters, where<prop-name>is the name of the property.- vorder
VertexPropertyMap(optional, default:None) If provided, defines the relative order in which the vertices are drawn.
- eorder
EdgePropertyMap(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.- window
GraphWindow(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,GraphWidgetandcairo_draw().
- g
- Returns:
- pos
VertexPropertyMap Vector vertex property map with the x and y coordinates of the vertices.
- selected
VertexPropertyMap(optional, only ifoutput is None) Boolean-valued vertex property map marking the vertices which were selected interactively.
- pos
Notes
See documentation of
GraphWidgetfor key bindings information.