I am trying to use the toolkit for graph visualization. I could run a simple program, but i could not figure out how to specify the different layout algorithms in the package. Could someone please give an example program showing how to use a different layout scheme? A simple one will do.
thanks, udeepta
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You just have to cross-reference the layout algorithm with your graph visualization :
FRLayout layout = new FRLayout(myVisualization) ;
//or GraphVizLayout = new GraphVizLayout(myVisualization), for insance
myVisualization.setLayout(layout);
NB: I had troubles using the GraphVizLayout on my mac and am currently forced to explicity give the path to the layout program "neato" :
GraphVizLayout layout = new GraphVizLayout(myVisualization);
layout.setLayoutProgram("/sw/bin/neato");
myVisualization.setLayout(layout);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To change the layout of a graph, you have two options.
1) You can change the layout algorithm, choose one from the infovis.graph.layout package.
2) You can use the GraphVizLayout and change the name of the external program used to compute the layout. The AT&T graphviz system provides 3 programs: dot, neato and twopi that you can use.
When you create a NodeLinkGraphVisualization, the default layouts is GraphVizLayout. You can get it and change it then using get getLayout method.
I hope it helps.
I'll add more examples in the next release.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to use the toolkit for graph visualization. I could run a simple program, but i could not figure out how to specify the different layout algorithms in the package. Could someone please give an example program showing how to use a different layout scheme? A simple one will do.
thanks, udeepta
You just have to cross-reference the layout algorithm with your graph visualization :
FRLayout layout = new FRLayout(myVisualization) ;
//or GraphVizLayout = new GraphVizLayout(myVisualization), for insance
myVisualization.setLayout(layout);
NB: I had troubles using the GraphVizLayout on my mac and am currently forced to explicity give the path to the layout program "neato" :
GraphVizLayout layout = new GraphVizLayout(myVisualization);
layout.setLayoutProgram("/sw/bin/neato");
myVisualization.setLayout(layout);
Hi,
To change the layout of a graph, you have two options.
1) You can change the layout algorithm, choose one from the infovis.graph.layout package.
2) You can use the GraphVizLayout and change the name of the external program used to compute the layout. The AT&T graphviz system provides 3 programs: dot, neato and twopi that you can use.
When you create a NodeLinkGraphVisualization, the default layouts is GraphVizLayout. You can get it and change it then using get getLayout method.
I hope it helps.
I'll add more examples in the next release.