Him
Him

Reputation: 5551

python graph-tool vertex_shape

I can't seem to find a list of possible values for vertex_shape in the documentation for graph-tool, nor an appropriate way to set up a property map for such a thing, or if there is a way to use custom shapes.

This is my intuition:

vshape = g.new_vertex_property("string")
v = g.add_vertex(1)
vshape[v] = "double_circle"
v2 = g.add_vertex(1)
vshape[v] = "pickle_shaped"
graph_draw(g,vertex_shape=vshape)

Anyone know of such a list? I'll check to see if the property map works as soon as graph-tool finishes compiling... =c)

Upvotes: 1

Views: 401

Answers (1)

Him
Him

Reputation: 5551

Found it. This works perfectly.

“circle”, “triangle”, “square”, “pentagon”, “hexagon”, “heptagon”, “octagon” “double_circle”, “double_triangle”, “double_square”, “double_pentagon”, “double_hexagon”, “double_heptagon”, “double_octagon”, “pie”

"pickle_shaped" is not an option, unfortunately. =c)

Upvotes: 1

Related Questions