Thanks for this. Sorted..!

However, I am still struggling to understand how to call and make use of the hierarchical vertexes and edges after running the nSBM.

state=gt.minimize_nested_blockmodel_dl(g)

I can then pull the levels and calculate their centrality with:

l1state = state.levels[1].g
ee1, x1 = gt.eigenvector(l1state)


But what command do I need to initiate to firstly save this into the property map, and then plot it, e.g. with the l1 level vertices sized proportionate to E.C in state.draw?

(Or I guess, consider a different scenario where I want to attribute value to the hierarchical edges, and then plot that accordingly).


I couldn't see any documentation for this on the website other than that hvprop does exist, but if there was such as an example please do point me to it...?


Thanks again!

James


On 15/08/2019 10:31, Tiago de Paula Peixoto wrote:
Am 07.08.19 um 14:20 schrieb James Ruffle:
Hi Tiago,

Thanks for this.

Unfortunately my machine seems to fail with calling state.draw() for interactive visualisation which makes it difficult to understand exactly how this interacts.
I am running it from the docker image, on macOS 10.14.16.

Following your instructions on installation page;

docker pull tiagopeixoto/graph-tool
xhost +local:
docker run -ti -u user -w /home/user --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix tiagopeixoto/graph-tool ipython

from graph_tool.all import * ; import graph_tool.all as gt ;
Unable to init server: Could not connect: Connection refused
(ipython:1): Gdk-CRITICAL **: 12:54:59.581: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)’ failed
(ipython:1): Gdk-CRITICAL **: 12:54:59.598: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)’ failed

g = gt.collection.data["celegansneural”]   
state = gt.minimize_nested_blockmodel_dl(g) 
state.draw()  
RuntimeError: Gtk couldn't be initialized. Use Gtk.init_check() if you want to handle this case.

Do you have a suggestion how to resolve this?

In MacOS I believe you need to have XQuartz installed:

    https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.lmgtfy.com%2F%3Fq%3Dmacos%2Bdocker%2Bconnecting%2Bto%2Bx%2Bserver&data=02%7C01%7Cj.ruffle%40qmul.ac.uk%7C5866439148a441907c9d08d721635a08%7C569df091b01340e386eebd9cb9e25814%7C0%7C0%7C637014582917811452&sdata=B3VgUw7w1j%2FSKbVppFXmxcoaTRzThxSG9czWNO%2B7Nmc%3D&reserved=0

Best,
Tiago


_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.skewed.de%2Fmailman%2Flistinfo%2Fgraph-tool&data=02%7C01%7Cj.ruffle%40qmul.ac.uk%7C5866439148a441907c9d08d721635a08%7C569df091b01340e386eebd9cb9e25814%7C0%7C0%7C637014582917831440&sdata=MYxKehagVI6p0AE%2FDY%2BjwzIU5AsV9cZ%2FxPALfZwur4w%3D&reserved=0