GraphStream Users

Archives de la liste Aide


Re: Dot export of my graph


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: Re: Dot export of my graph
  • Date: Wed, 6 Jul 2011 10:45:34 +0200

Hi Nicolas,

'flush()' is used with 'begin()' and 'end()' methods. It allows
to flush the current output. When using 'writeAll()', there is no
pending output so flush is called on a null object ...

Thanks for reporting this bug. I will fix it.

Regards.


2011/7/6 Nicolas Quattropani <nicolas.quattropani AT gmail.com>
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



--
Guilhelm Savin
PhD Student of Computer Science



  • Dot export of my graph, Nicolas Quattropani, 06/07/2011
    • Re: Dot export of my graph, guilhelm savin, 06/07/2011

Archives gérées par MHonArc 2.6.16.

Top of page