Vertex text size proportional to the size of the vertex

Dear all,

I am drawing a graph with the names of the vertex on each vertex. I am also
specifying that the sizes of vertices should be "proportional" to their
degree values (high degree vertices are bigger). Now, I want to do the same
for the vertex text also. Something like this:

size = g.new_vertex_property('float')
text_size = g.new_vertex_property('float')
for v in g.vertices():
    size[v] = 4 * np.sqrt(v.out_degree()) + 5
    text_size = 0.2 * size[v]

gt.graph_draw(g, vertex_size = size, vertex_text = names, vertex_font_size
= text_size, output = 'test.pdf')

However, this doesn't produce the desired result. What happens is that if
the vertex name is longer, the size of the vertex gets increased to
accommodate the text inside the vertex. I don't want this. I want all the
vertices with the same degree to have the same size, and the text size
inside the bigger vertex should be bigger. I am okay if the text goes
outside the vertex. How can I achieve this?

Thank you

attachment.html (1.44 KB)

Just use: vertex_text_position=0

Worked! How can I make the text bold also?

Thank you

attachment.html (1.4 KB)

I'm pretty sure all this is in the documentation....