Search code examples
neo4jtinkerpoptinkerpop3

How to use TinkerPop to print out an image?


For example, given this graph:

gremlin> graph = TinkerFactory.createModern() (1)
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal(standard())        (2)
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().has('name','marko').out('knows').values('name') (3)

I want to print out a PNG file for this graph from the console. The documentation doesn't say how to do it. Thanks in advance.


Solution

  • TinkerPop doesn't provide graph visualization options directly. The best you can do is either:

    1. Use the Gephi plugin to visualize your graph and then save that visualization to an image.
    2. Export your graph to GraphML and then import it into a visualization tool, like Gephi, Cytoscape, etc. and then export an image generated from there.