Search code examples
javagraphvisualizationjung

Creating a Graph with Too Many Vertices


I am going to build a graph in my java project and I am using Jung library. My problem is that I have too many vertices and with CircleLayout or FRlayout I can't have a good visualization of the graph; I mean the vertices are very very close to each other. Can anybody help me what I can do in such a situation?

I want to have a nice visualization of the graph in which the vertices are far enough to be able to see which vertex is connected to which vertex.

Here you see the current visualization of graph vertices. enter image description here


Solution

  • (Originally, this was a comment, but to give the question a chance to bre removed from the "unanswered" queue: )

    One important question might be what the topology of the graph is. Does the topology resemble a circle? That is, does each vertex have exactly two neighbors?

    Regardless of that, you should try the other layouts as well. Particularly the SpringLayout2. It has quite some tuning parameters, but usually causes a "nice" distribution of the vertices for a wide variety of graph topologies