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.


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!


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 =["celegansneural”]   
state = gt.minimize_nested_blockmodel_dl(g) 
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:


graph-tool mailing list