Tool tips / interactive drawing output

Hi,

First of all, thanks for a great library with great documentation. I'm
just starting with graph-tool but so far it looks really nice. I have
previously used the now unmaintained BGL-python bindings and for me it
is good that graph-tool seems to have some similarities in its API.

My question is: I often have large graphs where I cannot display vertex
labels in the output for reasons of space. I would really love to draw
these graphs to a format where I could hover with the mouse to produce
tool tips to show vertex labels, etc... Is this possible?

Thanks,
John.

Hi,

First of all, thanks for a great library with great documentation. I'm
just starting with graph-tool but so far it looks really nice. I have
previously used the now unmaintained BGL-python bindings and for me it
is good that graph-tool seems to have some similarities in its API.

Thanks!

My question is: I often have large graphs where I cannot display vertex
labels in the output for reasons of space. I would really love to draw
these graphs to a format where I could hover with the mouse to produce
tool tips to show vertex labels, etc... Is this possible?

Yes, you can do something similar to this. You can pass a list of
property maps as the "display_props" parameters to
graph_draw(). However, instead of a tooltip, it displays the property
values of the currently selected vertex in the lower left corner of the
screen.

Example:

        >>> label = g.new_vertex_property("string")
        >>> coordinates = g.new_vertex_property("vector<double>")
        >>> graph_draw(g, display_props=[label, coordinates])

I hope this helps.

Cheers,
Tiago