GraphStream Users

Archives de la liste Aide


Re: How much control do we have over the layout algorithm?


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: Mauricio Carvalho <mauricio0copo AT gmail.com>
  • Cc: graphstream-users AT litislab.fr
  • Subject: Re: How much control do we have over the layout algorithm?
  • Date: Mon, 1 Jul 2013 02:24:03 +0200

You just have to call the algorithm on a graph g :

Graph g = ... ;
...
g.display(false); // False is important
...
OpenOrdLayout layout = new OpenOrdLayout();
layout.init(g);
layout.compute();


Regards

Guilhelm


2013/7/1 Mauricio Carvalho <mauricio0copo AT gmail.com>
Sorry, but you give further instrunctions on how to use the openord algorithm?


2013/6/12 guilhelm savin <guilhelm.savin AT gmail.com>
Hi Szabolcs,

You can get more control over the layout algorithm by building a viewer by yourself :

Graph g = ... ;

...

Viewer v = new Viewer(g, Viewer.TheadingModel.GRAPH_IN_ANOTHER_THREAD);
v.addDefaultView(true);

LinLog layout = new LinLog();
layout.configure(...);
v.enableAutoLayout(layout);

You can find two layouts in gs-core, LinLog and SpringBox. There is also an adaptation of the OpenOrd layout here : https://github.com/gsavin/gs-openord
We want to implement new layout algorithms since a long time but ... 

Regards
Guilhelm


2013/6/12 Szabolcs Horvat <szhorvat AT nd.edu>
Hello again,

I was wondering, how much control can be exercised over the automatic graph layout algorithm?

Is there any other algorithm available than the default force directed one?  Is it possible to control some parameters of the default algorithm?  From what I could get from the docs, it seems that it should be possible to implement a new layout algorithm, but there is only a single built-in one.  Is this correct?

Thanks for any help in advance,
Szabolcs




--
Guilhelm Savin
PhD Student of Computer Science




--
Guilhelm Savin
PhD Student of Computer Science



Archives gérées par MHonArc 2.6.16.

Top of page