File targetFile = File.createTempFile( "graphviz", ".png" );
ProcessBuilder processBuilder = new ProcessBuilder( "dot", "-Tpng", "-o", targetFile.getAbsolutePath() );
Process process = processBuilder.start();
//Now output the dot file
Walker walker = new Walker() {
@Override
public <R, E extends Throwable> R accept( Visitor<R, E> visitor ) throws E {
for ( Node node : GlobalGraphOperations.at( graphDb ).getAllNodes() ) {
visitor.visitNode( node );
for ( Relationship edge : node.getRelationships( Direction.OUTGOING ) ) {