Michael, thanks you for your answer, it was very useful. Although I had an error (EPIPE) in this line g.setGraphVizPath( "/usr/local/bin" );. The solution is to change the path to the binaries files (if you are working on windows)