Sorry for the incomplete description.
Here is my code:
state = gt.minimize_nested_blockmodel_dl(new_graph, deg_corr=True)
pos = state.draw( output='2015_'+str(j+1)+'_nested.png',
output_size=(900, 900))[0]
text_rot = new_graph.new_vertex_property('double')
new_graph.vertex_properties['text_rot'] = text_rot
for v in new_graph.vertices():
if pos[v][0] >0:
text_rot[v] = math.atan(pos[v][1]/pos[v][0])
else:
text_rot[v] = math.pi + math.atan(pos[v][1]/pos[v][0])
state.draw( output='2015_'+str(j+1)+'_nested.png',
output_size=(900, 900),
vertex_text=v_prop,
vertex_size=v_size,
vertex_fill_color=b,
vertex_shape=shape,
vertex_font_size=12,
vertex_text_position=0,
vertex_text_rotation=new_graph.vertex_properties['text_rot'],
bg_color=[0,0,0,1])
My question is how to get the correct pos values for the vertices. Instead of this line:
pos = state.draw( output='2015_'+str(j+1)+'_nested.png',
output_size=(900, 900))[0]
which might not be the most elegant way to solve this problem.
Best
Philipp