Dear Tiago,

I am trying to draw float values associated with vertices in a graph as
vertex texts. However, I get a peculiar output (file attached).  My code is
given below:

import graph_tool.all as gt
import numpy as np

g = gt.collection.data['karate']

value = g.new_vertex_property('float')

for v in g.vertices():
    value[v] = np.random.choice([0.5, 0.8])

gt.graph_draw(g, vertex_text = value, output = 'test.pdf')

How can I draw the float values as such?

Thank you
Snehal



-- 
Snehal M. Shekatkar
Pune
India

Attachment: test.pdf
Description: Adobe PDF document

_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to