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

Tiago de Paula Peixoto tiago at skewed.de
Tue Jan 21 20:36:02 CET 2020


Am 17.01.20 um 10:53 schrieb Lietz, Haiko:
> Hi Paul,
> 
>  
> 
> From how I understand things, you can get the used colors this way:
> 
>  
> 
> from graph_tool.all import *
> 
> num_blocks = 14
> 
> for i in range(0, num_blocks):
> 
>     j = int(i*(255/num_blocks-1))
> 
>     print(default_cm(j))
> 
>  
> 
> Here ``num_blocks`` is the number of colors that are needed (in a
> celegans case: 14).
> 
>  
> 
> Is this correct, Tiago or others?

I suppose you meant:

     j = int(i*(255/(num_blocks-1)))


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


More information about the graph-tool mailing list