Just to iterate:

 

If I have a graph

 

edge_list=[[0,1,1],[0,2,1],[0,3,1],[1,2,1],[1,3,1],[2,3,1],[0,4,2],[0,5,2],[0,6,2],[1,7,2],[1,8,2],[1,9,2],[2,10,2],[2,11,2],[2,12,2],[3,13,2],[3,14,2],[3,15,2],[4,5,2],[4,6,2],[5,6,2],[7,8,2],[7,9,2],[8,9,2],[10,11,2],[10,12,2],[11,12,2],[13,14,2],[13,15,2],[14,15,2]]

g = Graph(directed=False)

weight = g.new_edge_property('int')

g.add_edge_list(edge_list, eprops=[weight])

 

and a nested blockmodel

 

state = minimize_nested_blockmodel_dl(g, state_args=dict(eweight=weight))

 

then I can either draw the graph directly with a partition from a given level l

 

state.project_level(l=0).draw()

 

or store the partition in a property map

 

group = state.project_partition(l=0, j=0)

 

and then use this map in conventional drawing

 

graph_draw(g, vertex_fill_color=group)

 

Best

 

Haiko