Straightforward way to render a force directed graph svg/png

I was wondering if there is a "simple" way in java for me to take a GraphTraversal and render a force directed picture of the graph or subgraph it returns?
4 Replies
spmallette
spmallette15mo ago
i'm not aware of any tools that do that from like a Java API. you would use tools like G.V() or Gremlify for those things. The Gephi plugin to the Gremlin Console does showcase one way you can do such a thing programmatically i guess. It requires the streaming plugin though for it to work. https://tinkerpop.apache.org/docs/current/reference/#gephi-plugin
cinterloper
cinterloper15mo ago
ah, right. I remember setting that up a long time ago. I think you make a YouTube video about it. I was hoping to have a simple java only frame by frame animation type thing, I guess I will have to write a force directed rendering impl in java if I really want it that bad. java
Jim Idle
Jim Idle15mo ago
I suppose that you could just generate a .dot file and use the sfdp renderer with Graphviz. It means writing a bit of code, but it is simply an iteration through the results and generating a text file, then executing the dot command. https://graphviz.org/docs/layouts/sfdp/
Graphviz
sfdp
stands for Scalable Force-Directed Placement.
Jim Idle
Jim Idle15mo ago
It's more or less what we do in ANTLR
Want results from more Discord servers?
Add your server