I do not have a complete recipe, but I can share my thoughts.
Since a graph can be visualized in many ways, you must somehow control its appearance. Simply drawing nodes and edges without preprocessing is not a good option - this approach will give you a random bunch of edges and nodes, especially on large graphs.
Here is an example algorithm for obtaining a clean and visually appealing presentation of the graph:
- Run a certain force-oriented algorithm on the graph.
- Calculate the modularity of the graph and the color of each node using the modularity class.
- Resize each node based on its degree.
- If the graph is too large, filter out nodes that you are not interested in (probably nodes with a low degree).
- Change the thickness of the ribs according to their weight.
- Add labels to nodes and edges.
You can do such things with Gephi (in manual mode). They also offer the Gephi Toolkit , which should be able to automate such things (unfortunately, I have not tried it myself yet). Therefore, I would try to write a simple console Java program that uses this toolkit.
Here is an example of a graph rendered using the above algorithm:

source share