GraphStream Users

Archives de la liste Aide


Re: Simple Tree-Layout


Chronologique Discussions 
  • From: Benjamin Aaron Degenhart <b.degenhart.study AT gmail.com>
  • To: Yoann Pigné <yoann.pigne AT gmail.com>
  • Cc: graphstream-users AT litislab.fr
  • Subject: Re: Simple Tree-Layout
  • Date: Sat, 9 May 2015 21:53:51 +0200

I see, thanks for your reply Yoann!

Then I am wondering though why the layout produced by the HierarchicalLayout class looks so odd in comparison to the result by an equivalently named algorithm in yEd for instance: https://gist.github.com/benjaminaaron/91c5b737c86b9abc7301
Guilhelm, am I using your class wrong?

Best regards,
Benjamin

On Sat, May 9, 2015 at 8:21 PM, Yoann Pigné <yoann.pigne AT gmail.com> wrote:
Hi Benjamin,

Your code is actually running two layout algorithms; the default one and the hierarchical one.

In order to deactivate the default layout, pass parameter `false` to the graph.display method :

Viewer viewer = graph.display(false);

Since the hierarchical layout computes only once (after each graph update  I guess), this will also answer your second question about animation.


Regards,

Yoann


> On May 9, 2015, at 6:53 PM, Benjamin Aaron Degenhart <b.degenhart.study AT gmail.com> wrote:
>
> Hello there,
>
> graphstream seems great, I'd like to use it!
>
> Unfortunately I am failing (despite searching around) at the simple task to create a tree-layout in an example: https://gist.github.com/benjaminaaron/6f95c3dca98c124acd15
> I would be grateful for some guidance as to what I need for the result to be a hierarchical layout and not the default one.
> Also is there a way I can shorten or avoid the animation and have the layouted graph immediately?
>
> Greetings from Munich, Germany,
> Benjamin





Archives gérées par MHonArc 2.6.16.

Top of page