问题
What is the graph layout algorithm that is used in Neo4j? I would like to have the paper that explain the graph layout algorithm that is shown in NEO4J. I wan to know why the nodes are organized in the way Neo4j presents them.
回答1:
To visualize a graph in the neo4j-browser is used d3 library.
View implementation of d3.layout.force here: layout.ts.
回答2:
The layout algorithm used for visualizing graphs in the Neo4j browser is a force directed algorithm. From Wikipedia:
Their purpose is to position the nodes of a graph in two-dimensional or three-dimensional space so that all the edges are of more or less equal length and there are as few crossing edges as possible, by assigning forces among the set of edges and the set of nodes, based on their relative positions, and then using these forces either to simulate the motion of the edges and nodes or to minimize their energy.
For academic references, there is a chapter from the Handbook of Graph Drawing and Visualization that covers much of the literature here.
In addition to the Neo4j Browser code linked in stdod--'s answer there is a D3 example of force directed layout here.
来源:https://stackoverflow.com/questions/38708570/graph-layout-algorithm-of-neo4j