Skip to content

Instantly share code, notes, and snippets.

@olange
Last active August 29, 2015 14:26
Show Gist options
  • Save olange/5c592b8a5b46ebcbb6bf to your computer and use it in GitHub Desktop.
Save olange/5c592b8a5b46ebcbb6bf to your computer and use it in GitHub Desktop.
Getting Neo4j Graphviz command-line options right

### Running the Neo4j GraphViz module

The quotes around the nodeTitle, relationshipTitle and nodePropertyFilter must be escaped on the shell command-line, to get them to the graphviz main class:

$ ./graphviz ~/neo4j/data/graph.db \
             relationshipTitle=\"@type\" nodePropertyFilter=name

or

$ ./graphviz ~/neo4j/data/graph.db relationshipTitle=\@type nodeTitle=\$name    
             nodePropertyFilter=tp_kind,tp_power,nb_pers,dt_open,dt_close,peRefCount,iso3Code,dt_birth,dt_death

Rendering the result

$ dot -Tpng graph.dot > graph.png
$ open graph.png

or

$ for f in *.dot ; do dot -Tpng -o$f.png $f; done
$ open *.png

See also

Troubleshooting

When getting an error Error starting org.neo4j.kernel.EmbeddedGraphDatabase, …graph.db, caused by org.neo4j.kernel.StoreLockException: Unable to obtain lock on store lock file: …store_lock, stop the Neo4j server first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment