# A Multilevel Algorithm for Force-Directed Graph Drawing

## Abstract

We describe a heuristic method for drawing graphs which uses a multilevel technique combined with a force-directed placement algorithm. The multilevel process groups vertices to form *clusters*, uses the clusters to define a new graph and is repeated until the graph size falls below some threshold. The coarsest graph is then given an initial layout and the layout is successively refined on all the graphs starting with the coarsest and ending with the original. In this way the multilevel algorithm both accelerates and gives a more global quality to the force- directed placement. The algorithm can compute both 2 & 3 dimensional layouts and we demonstrate it on a number of examples ranging from 500 to 225,000 vertices. It is also very fast and can compute a 2D layout of a sparse graph in around 30 seconds for a 10,000 vertex graph to around 10 minutes for the largest graph. This is an order of magnitude faster than recent implementations of force-directed placement algorithms.

## References

- 1.R. Davidson and D. Harel. Drawing Graphs Nicely using Simulated Annealing.
*ACM Trans. Graphics*, 15(4):301–331, 1996.CrossRefGoogle Scholar - 2.G. Di Battista, P. Eades, R. Tamassia, and I. G. Tollis.
*Graph Drawing: Algorithms for the Visualization of Graphs*. Prentice-Hall, New Jersey, U.S.A., 1998.Google Scholar - 3.C. A. Duncan, M. T. Goodrich, and S. G. Kobourov. Planarity-Preserving Clustering and Embedding for Large Planar Graphs. In J. Kratochví, editor,
*Proc. 7th Int. Symp. Graph Drawing*, volume 1731 of*LNCS*. Springer, 1999.Google Scholar - 4.P. Eades. A Heuristic for Graph Drawing.
*Congressus Numerantium*, 42:149–160, 1984.MathSciNetGoogle Scholar - 5.P. Eades and Q. Feng. Multilevel Visualization of Clustered Graphs. In
*Proc. 6th Int. Symp. Graph Drawing*, volume 1190 of*LNCS*, pages 101–112. Springer, 1996.Google Scholar - 6.P. Eades, Q. Feng, X. Lin, and H. Nagamochi. Straight-Line Drawing Algorithms for Hierarchical Graphs and Clustered Graphs. Tech. rep. 98–03, Dept. Comp. Sci., Univ. Newcastle, Callaghan 2308, Australia, 1998.Google Scholar
- 7.T. M. J. Fruchterman and E. M. Reingold. Graph Drawing by Force-Directed Placement.
*Software-Practice & Experience*, 21(11):1129–1164, 1991.CrossRefGoogle Scholar - 8.R. Hadany and D. Harel. A Multi-Scale Algorithm for Drawing Graphs Nicely. Tech. Rep. CS99–01, Weizmann Inst. Sci., Faculty Maths. Comp. Sci., Jan, 1999.Google Scholar
- 9.D. Harel and Y. Koren. A Fast Multi-Scale Algorithm for Drawing Large Graphs. Tech. Rep. CS99–21, Weizmann Inst. Sci., Faculty Maths. Comp. Sci., Nov, 1999.Google Scholar
- 10.B. Hendrickson and R. Leland. A Multilevel Algorithm for Partitioning Graphs. In S. Karin, editor,
*Proc. Supercomputing’ 95*. ACM Press, 1995.Google Scholar - 11.C. H. Papadimitriou and K. Stieglitz.
*Combinatorial Optimization: Algorithms and Complexity*. Prentice Hall, Englewood Cliffs, NJ, 1982.MATHGoogle Scholar - 12.R. Sablowski and A. Frick. Automatic Graph Clustering. In
*Proc. 6th Int. Symp. Graph Drawing*, volume 1190 of*LNCS*, pages 395–400. Springer, 1996.Google Scholar - 13.D. Tunkelang. JIGGLE: Java Interactive General Graph Layout Environment. In S. H. Whitesides, editor,
*Proc. 6th Int. Symp. Graph Drawing*, volume 1547 of*LNCS*, pages 413–422. Springer, 1998.Google Scholar - 14.C. Walshaw. A Multilevel Algorithm for Force-Directed Graph Drawing. Tech. Rep. 00/IM/60, Univ. Greenwich, London SE10 9LS, UK, April 2000.Google Scholar
- 15.C. Walshaw. A Multilevel Approach to the Travelling Salesman Problem. Tech. Rep. 00/IM/63, Univ. Greenwich, London SE10 9LS, UK, Aug. 2000.Google Scholar