I am working on generating a graph with Java using jgraph and jgrapht libraries. The problem is that my graph has a very big number of vertices (varying from 300 to 1000 in some cases) and no matter what I try, vertices and edges keep on overlapping each other creating a mess and, of course, a non-readable graph. The method I used until now for placing the vertices on the JFrame is using random numbers as coordinates. Is there some other way to make this work? Maybe a better working algorithm or another Java library for better results? Thank you in advance!
Asked
Active
Viewed 1,143 times
1 Answers
0
We are currently having the same issue . Our graphs can also be extremely big . Using random number co-ordinates to generate the graph does not seem to be such a good idea ( Just my opinion ). I have been using the graphiz library to generate graphs . It can handle fairly large graphs without them overlapping each other . You can check it out here
Depending on the type of graph you want can select one of graph algorithms ( dot,neato , fdp ,etc) Check out their gallery as well

rockstar
- 3,512
- 6
- 40
- 63
-
Thank you very much, I tried Graphviz and the result is considerably better. – rawrintheclouds Apr 17 '14 at 13:14
-
@cheflora thats excellent to hear . We still would want to make the whole visualization better . It would be interesting to hear if you are able to get a very good UI . Would like to hear about that . Cheers – rockstar Apr 21 '14 at 01:28