Reputation: 2009
I'm currently trying to use the jung library (http://jung.sourceforge.net) to draw a directed graph of nodes and vertices. I have a few questions on some issues I have a hard time finding the answer to in the documentation:
How do you check whether a vertex exists on a graph or not?
How do you turn off labels for edges in the actual displaying of the graph?
When I am adding vertices on a DirectedSparseMultiGraph, they all tend to form a circle formation. Since I am trying to add over 100 nodes, I would like to spread them out somehow.
Thanks
Upvotes: 0
Views: 367
Reputation: 2704
(1) Graph.containsVertex()
(2) Don't provide edge labels if you don't want them. PluggableRendererContext controls many aspects of visualization; see the methods for providing edge labels.
(3) What layout are you using? JUNG has a number of different ones.
Upvotes: 2