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()
.- vprops
dict
(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.- eprops
dict
(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.- 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.
- nodesfirst
bool
(optional, default:False
) If
True
, the vertices are drawn first, otherwise the edges are.- geometrytuple (optional, default:
(500, 400)
) Window geometry.
- update_layout
bool
(optional, default:True
) If
True
, the layout will be updated dynamically.- main
bool
(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_window
bool
(optional, default:False
) If
True
, the GTK+ window will be returned.- **kwargs
Any extra parameters are passed to
GraphWindow
,GraphWidget
andcairo_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
GraphWidget
for key bindings information.