GraphStream Users

Archives de la liste Aide


Issues with the dot format.


Chronologique Discussions 
  • From: Nicolas Quattropani <nicolas.quattropani AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: Issues with the dot format.
  • Date: Tue, 12 Jul 2011 11:36:06 +0200

Hi,


I am now working with the dot format and I have some remarques / questions. I made this easy example in order to present what I found to you. First of all, I create a dot file from my graph like this :


public class ExportTest {


public static void main(String args[]) {

new ExportTest();

}


public ExportTest() {

DefaultGraph g = new DefaultGraph("dot");

FileSink t = new FileSinkDOT();

g.addNode("A-1");

g.addNode("B");

g.addNode("C");


g.addEdge("1", "A-1", "B", true);

g.addEdge("2", "A-1", "C", true);

g.addEdge("3", "B", "C", true);


try {

t.writeAll(g, "testDot");

} catch (IOException e) {

e.printStackTrace();

}

}

}


And here is the generated dot file :


graph {

A-1;

B;

C;

B -> C;

A-1 -> C;

A-1 -> B;

}


I want after that to use graphViz and display my graph in a pdf file like this : "dot –Tpdf testDot –o graph.pdf"


My first problem is that it's not working because the "digraph" keyword should be written instead of "graph". Then we obtain this pdf file:


http://imageshack.us/photo/my-images/189/resultb.png/


We can see that the composed names with the "-" are not properly handled. There is no problem when those names are surrounded by quotation mark "" .

 

Finally, how can I apply some of my css aspects in the pdf generated by GraphVitz ? I guess I have to look toward graphviz but I was wondering if there is an easy way to do that and modify the shapes aspect of my nodes (for example) in the pdf ?


Thanks for your help.

Regards,


Nicolas.




Archives gérées par MHonArc 2.6.16.

Top of page