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?

I can of course make use of the output function to review what changes are 
being made, but it still leaves me a little confused of how I can assign hvprop 
weightings and call upon them with state.draw.

Alternatively, could you kindly provide an example how to make use of the 
hvprops, add a set of parameters as weights (such as the eigenvector centrality 
of hierarchical nodes) and assign this as a propertymap for the output? I’m not 
sure if such an example is available on your repository, but do correct me if 
I’m wrong..

Appreciate your guidance!

James

> On 6 Aug 2019, at 10:42, Tiago de Paula Peixoto <[email protected]> wrote:
> 
> Am 05.08.19 um 15:09 schrieb Ruffle, James:
>> 1) This presumably then needs to be saved as a hvprops(?!). But, I am 
>> unclear how to do this, not least in a way that I know for sure that the 
>> correct hierarchical vertices within l1state and l2state are aligning to the 
>> generated centrality measures of x1 and x2, respectively.
>> 
>> 2) Furthermore, if/when that is achieved, how can I call upon this in 
>> drawing, for example to size the level 1 hierarchical vertices according to 
>> centrality, or level 2 vertices by another measure, etc.?
> 
> If you call state.draw() (which calls draw_hierarchy()), it returns,
> among other things, the hierarchy tree as a graph. The 'hvprops' should
> be a dictionary with drawing attributes to that graph. It can contain
> property maps, which do not need to be owned by the hierarchy tree but
> need to have the same size.
> 
> To get the hang of it, you can call state.draw() once to obtain the
> hierarchy tree, and then pass values to hvprops to see how that affects
> the layout.
> 
> Best,
> Tiago
> 
> -- 
> Tiago de Paula Peixoto <[email protected]>
> 
> _______________________________________________
> graph-tool mailing list
> [email protected]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.skewed.de%2Fmailman%2Flistinfo%2Fgraph-tool&amp;data=02%7C01%7Cj.ruffle%40qmul.ac.uk%7C0ea3a8c03e9b4f7062aa08d71a5291b0%7C569df091b01340e386eebd9cb9e25814%7C0%7C0%7C637006814256695922&amp;sdata=G7g05DXD5IFj4T%2Fov3AsXbdweKdkAabUfBfwqGwMii4%3D&amp;reserved=0

_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to