Node position on xy axis

Hi all,

Is possible to know the display x,y position of a matched node in Desktop browser?

Some library can ?!?

Thank you

Do you mean the actual display position on screen? Those x,y values are determined dynamically at display time, and it changes (sometimes constantly), both through automatic layout (wiggling into place) and user interaction.

I believe getting access to that information and displaying it (the changing x,y values underneath) would require using a custom viewer or export the graph to use a layout method to arrange the nodes and record x,y coordinates assigned. Note: There are many ways to layout a graph, if you like how Neo4j does it, the source code is available, if I recall correctly they use d3, the gravity and other settings they use would be in the code base somewhere.

If you want to delve deep into layout (and I seem to recall there was a way to export the x,y info from one of these two tools? but I'm not 100% sure), you might look into Cytoscape and Gephi. It is relatively straight forward (once you do it), to run a cypher and visualize graphs in these tools, they each have a variety of layout options (and more layouts are available as plugins), I use them as needed when my needs push beyond the capabilities of the neo4j desktop viewer. They can both handle much larger graphs, visually on screen, and have more options, but as you might imagine they are also considerably more complicated (these are power user tools, block off plenty of time if you want to try one, and have a large bottle of patience on hand, they can be frustrating at times).

Thank you Joel.

I have a project and a prototype in progress for a static graph view in VR, starting from graphdb data.
Where can I find the source code of Neo4j for layout a graph?
Is a nice idea to take the screen coordinate axis and see the libraries you think about.
Thanks for your time and your expertise.



I believe you will want to find a layout algorithm to determine the coordinates. If viewing in VR, personally I'd want to try a 3D layout first, and see if using the 3D space of a VR view is useful. (or not) For transparency I think there would be some occlusion challenges in a 3D layout view, but VR is 3D.

The neo4j browser view is 2D...

Force directed is probably the most common method, here is a nice introduction

Force directed can be done in 3D just as easily.

here is the github repo

1 Like

Great, thank you Joel