[graph-tool] Stochastic Blockmodeling Result: Vertex and Edge colors

Tiago de Paula Peixoto tiago at skewed.de
Tue Jan 21 14:56:19 CET 2020


Am 17.01.20 um 04:56 schrieb Paul Jung:
> Hello,
> 
> I think I am having the same problem recently risen. I was just
> wondering how I can access to the color tuples of the given mapping
> (draw) results. Given that:
> 
>>>> g = gt.collection.data["celegansneural"]
>>>> state = gt.minimize_nested_blockmodel_dl(g, deg_corr=True)
>>>> gt.draw_hierarchy(state, output="celegansneural_nested_mdl.pdf")
> 
> I want to use the color codes of blocks (vertex) and edges for another
> mapping. Any ideas?

As explained in that thread, you can get the colors from the color map:

    graph_tool.draw.default_cm


-- 
Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20200121/5dbaa245/attachment.asc>


More information about the graph-tool mailing list