Graph Drawing by the Magnetic Spring Model

Abstract A novel and heuristic method for drawing graphs is proposed, introducing a new model called the magnetic spring model , that is an extension of the model by Eades. Graph drawing by force-directed placement has mainly been investigated so far for undirected graphs, and the idea of controlling edge orientations has not been considered. The proposed method can control orientations of links and can nicely draw not only undirected graphs but also other classes of graphs such as trees, directed graphs and mixed graphs in a simple and unified manner. Moreover, since the method is based upon simulations of physical systems, it is conceptually intuitive and therefore quite easy to understand, implement and improve the method. The magnetic spring model and algorithm are presented and many examples of drawings and results from statistical experiments are shown to demonstrate the effectiveness of the proposed method.