Dear Tiago, I tried, g, bm = gt.random_graph( 1000, lambda: np.random.poisson(10), model="blockmodel-traditional", vertex_corr = corr, directed = False, block_membership=lambda: random.randint(1, 10) ) where corr is, def corr(a, b): if a == b: return 1. else: return 0. The edges are not forced to stay within the blocks, when I checked with, gt.graph_draw(g, vertex_fill_color=bm, edge_color="black") Am I missing something? Thanks. Best regards, Tzu-Chi -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.