GraphStream Users

Archives de la liste Aide


Dot export of my graph


Chronologique Discussions 
  • From: Nicolas Quattropani <nicolas.quattropani AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: Dot export of my graph
  • Date: Wed, 6 Jul 2011 10:35:38 +0200

Hi, 

I am currently trying to export my graph in various formats like dot, svg etc ..

I don't understand why this basic following example is not working when I add the line dot.flush() ?

package testTuto;

 

import java.io.IOException;

 

import org.graphstream.graph.implementations.DefaultGraph;

import org.graphstream.stream.file.FileSinkDOT;

 

public class ExportTest {

 

                public static void main(String args[]) {

 

                               DefaultGraph g = new DefaultGraph("export DOT");

 

                               FileSinkDOT dot = new FileSinkDOT();

 

                               g.addNode("A");

                               g.addNode("B");

                               g.addNode("C");

                               g.addEdge("AB", "A", "B");

                               g.addEdge("AC", "A", "C");

                               g.addEdge("BC", "B", "C");

 

                               try {

                                               dot.writeAll(g, "exportDOT.dot");

                                               dot.flush();

                               } catch (IOException e) {

                                               e.printStackTrace();

                               }

                }

}


Am I using the right method to export my graph in these kind of formats ?

Nicolas



Archives gérées par MHonArc 2.6.16.

Top of page