This is a somewhat general question but perhaps somebody can point me in a useful direction: I am trying to draw a small network of molecules. Ideally I would like to use the molecular structures (which I can save as image file) in the network representation as opposed to the normal little red circles. Is it possible to specify a separate file for each vertex that gets used as position marker? I have found "surface" as a vertex property in "graph_draw" but am not sure if that is what I am after. Best wishes, Philipp -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 28.11.2016 14:24, P-M wrote:
This is a somewhat general question but perhaps somebody can point me in a useful direction: I am trying to draw a small network of molecules. Ideally I would like to use the molecular structures (which I can save as image file) in the network representation as opposed to the normal little red circles. Is it possible to specify a separate file for each vertex that gets used as position marker? I have found "surface" as a vertex property in "graph_draw" but am not sure if that is what I am after.
Take a look at the animation demo, which explains how to do that: https://graph-tool.skewed.de/static/doc/demos/animation/animation.html#sirs-... In particular, you want to take a look at: https://graph-tool.skewed.de/static/doc/_downloads/animation_zombies.py -- Tiago de Paula Peixoto <tiago@skewed.de>
Thank you Tiago, that worked! A problem I have however is that I need to make the images of a reasonable size so that I can read them properly once printed but that they then start overlapping. I can of course counteract that by increasing the canvas size but if I print on A4 all that means is that the whole image is then scaled down again so it becomes illegible once more. Is there a way of keeping vertices from overlapping? (This is a very similar problem to the one outlined on stackoverflow here: https://stackoverflow.com/questions/37559695/stop-vertexes-from-overlapping-... <https://stackoverflow.com/questions/37559695/stop-vertexes-from-overlapping-eachother-when-drawing-using-graph-tool> ) -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
participants (2)
-
P-M -
Tiago de Paula Peixoto