-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grandalf layout seems to give horizontal layouts instead of more vertically-aligned layouts #5
Comments
Just as a comment: this compactification really should be an optional feature! |
First reason for getting a wider graph is that grandalf will put in top layer all nodes with no incoming edge. In this case, it thus naturally pushes to the right all nodes connected to the top green node that graphviz managed to put on the 4th layer (thanks to a re-ranking that tries to minimize total edge length). However it does not fully explain why grandalf leads sometimes to 'wider than expected' layouts. I will investigate further. Meanwhile, you might want to test drawing without the 'median x' result by taking as x-coord for each node v the value self.grx[v].x[0] for example (or x[1], x[2], x[3] as well to see the differences) where self is your SugiyamaLayout instance, and/or increase the self.yspace to adjust the aspect-ratio. |
Hi, thanks for the suggestions, still, I haven't been able to make it much better... I can make it a little less wider by making the spacing smaller (but that's still too wide). In general, for my use-case (which is seeing profile results), the result I get is almost always too wide. Also, for my use-cases, related nodes usually tend to be horizontally far away from one another... (you can see connections from 5-7 columns apart when I'd expect them to be closer -- maybe this would be solvable by the re-ranking you mentioned to minimize the total edge length). I'd really appreciate if there was an option to improve on those situations. |
I'm finding that most of my layouts don't appear very well without the simplex step to minimize the edge len... do you have any idea when/if you'll be able to add that feature? |
I just tested it and while there are still things to improve (which the simplex should help fixing) it's definitely a good improvement already :) Thank you very much! |
As an example of what I mean, I'm attaching 2 files with the results I've gotten so far:
File 1 was generated by grandalf:
File 2 was generated by graphviz:
The .dot file example to generate this is available at: http://pastebin.com/K0EsAtFf
Do you think it's possible to improve this in grandalf?
The text was updated successfully, but these errors were encountered: