The Graph Visualization System (GVS)
Total Page:16
File Type:pdf, Size:1020Kb
The Graph Visualization System (GVS) A Flexible Java Framework for Graph Drawing Wolfgang Prinz The Graph Visualization System (GVS) A Flexible Java Framework for Graph Drawing Master’s Thesis at Graz University of Technology submitted by Wolfgang Prinz Institute for Information Systems and Computer Media (IICM), Graz University of Technology A-8010 Graz, Austria 21st March 2006 c Copyright 2006 by Wolfgang Prinz Advisor: Ao.Univ.-Prof. Dr. Keith Andrews Das Graph Visualization System (GVS) Ein flexibles Java Gerust¨ zum Zeichnen von Graphen Diplomarbeit an der Technischen Universitat¨ Graz vorgelegt von Wolfgang Prinz Institut fur¨ Informationssysteme und Computer Medien (IICM), Technische Universitat¨ Graz A-8010 Graz 21. Marz¨ 2006 c Copyright 2006, Wolfgang Prinz Diese Arbeit ist in englischer Sprache verfasst. Betreuer: Ao.Univ.-Prof. Dr. Keith Andrews Abstract A graph describes relationships between entities and is usually represented by a set of nodes (entities) and a set of edges (relations) between the nodes. Metadata such as labels or weights are often associated with the elements of a graph. The field of graph drawing, part of the wider field of information visualization, seeks to visualize the abstract information contained within a graph for the human observer. A drawing of a graph is a graphical image, in two or three dimensions, which reflects the graph’s topology and characteristics as closely as possible. Applications of graph drawing include social network and web site visualization, transportation network maps, and document cluster analysis. The Graph Visualization System (GVS) is a modular, flexible, and extensible framework for graph drawing implemented in Java. GVS provides implementations of some of the standard layered and force- directed graph drawing techniques. In addition, GVS is designed to be used as a demonstrator tool when teaching graph drawing methods. To this end, each of the implemented algorithms is divided into its constituent parts, which can be stepped through (and undone) interactively. Kurzfassung Ein Graph beschreibt Beziehungen zwischen Elementen und besteht gewohnlich¨ aus einer Menge an Knoten (Elemente) und einer Menge an Kanten (Beziehungen) zwischen diesen Knoten. Oft werden durch Metadaten zusatzlich¨ Beschriftungen oder Gewichte an Elementen des Graphen angebracht. Das Visualisieren von Graphen, als Teilgebiet der Informationsvisualisierung, versucht die in Gra- phen enthaltene abstrakte Information fur¨ den menschlichen Betrachter aufzubereiten. Das Bild eines Graphen kann sowohl zwei- als auch dreidimensional sein. Es versucht die Topologie des Graphen und dessen Charakteristik wiederzugeben. Anwendungen hierfur¨ sind die Visualisierung von sozialen Netz- werken oder Internetseiten, die Darstellung von Verkehrslinien oder die Analyse von Dokumentclustern. Das Graph Visualization System (GVS) ist ein modulares, flexibles und erweiterbares Java Pro- grammgerust¨ zur Visualisierung von Graphen. GVS beinhaltet bereits die Implementierungen einiger hierarchischer sowie einiger “force-directed” Techniken. Zusatzlich¨ wurde GVS als Demonstrations- programm zur Veranschaulichung jener Techniken fur¨ den Lehrbetrieb entwickelt. Diesem Rechnung tragend kann jeder Algorithmus durch Interaktion mit dem Anwender schrittweise abgearbeitet und ana- lysiert werden. I hereby certify that the work presented in this thesis is my own and that work performed by others is appropriately cited. Ich versichere hiermit, diese Arbeit selbstandig¨ verfaßt, andere als die angegebenen Quellen und Hilfs- mittel nicht benutzt und mich auch sonst keiner unerlaubten Hilfsmittel bedient zu haben. Acknowledgments First of all I would like to thank my parents Horst and Ingrid for their unrestricted and life-long support. In addition, I want to thank my sister Christine for being patient with me all the time and enduring my, in her opinion, boring talks about graph drawing and mathematics. Further thanks go to Harald Axmann, Edmund Ehrlich, Marco Haid, and of course Helmut Pauer (now Helmut Mader), who accompanied me through my study. Simon Jantscher has to be thanked for politely asking about the progress of my work from time to time. I want to thank my supervisor Keith Andrews for his support and constructive criticism during my work. The appearance of the user interface of GVS was particularly influenced for the better through his advice. This work is dedicated to my old school friend, Christian Perktold, who died tragically in an avalanche in March 2006. Wolfgang Prinz Graz, Austria, March 2006 xiii xiv Credits • Figure 1.1 is an excerpt from the “Grazer Straßenbahnlinienubersicht¨ mit Umsteigemoglichkeiten”¨ provided by the Grazer Verkehrsbetriebe (public transport systems of Graz) via their web page http://www.gvb.at/home/z-files/Plan.pdf. • Figure 1.3 was taken from http://en.wikipedia.org/wiki/Image:Minard.png. • All screenshots presented in this work were made from local installations of the corresponding software and were created by the author himself. xv xvi Contents Contents xvii 1 Introduction 1 1.1 Applications of Graphs and Graph Drawings . 1 1.2 Information Visualization . 2 1.3 Graph Drawing . 6 1.4 Scope of this Thesis . 7 1.5 Structure of this Thesis . 7 2 Graph Drawing 9 2.1 Graph Theory . 9 2.2 Graph Representation . 13 2.3 Aesthetics and Constraints . 14 2.4 A Taxonomy of Graph Drawing . 16 3 Graph Drawing Packages 25 3.1 Important Issues of Graph Drawing Packages . 25 3.2 Graphviz . 26 3.3 Algorithms for Graph Drawing (AGD) . 28 3.4 Java Universal Network/Graph Framework (JUNG) . 29 3.5 Pajek . 31 3.6 WilmaScope . 33 3.7 GEOmetry for Maximum Insight (GEOMI) . 34 3.8 Tulip . 36 3.9 Further Packages . 37 3.10 Information Visualization Packages . 40 3.11 Considerations on the Graph Drawing Packages . 42 4 The Graph Visualization System (GVS) 43 4.1 Goals . 43 4.2 Groundwork . 44 4.3 Key Issues For Designing GVS . 48 4.4 Software Architecture . 50 xvii 5 Selected Details of the Implementation 59 5.1 Force-Directed Methods . 59 5.2 StressMajorization . 61 5.3 Dig-CoLa . 63 5.4 Visualizing Longest Path Layering . 67 6 Outlook 69 6.1 Trends in Graph Drawing . 69 6.2 Further Development of GVS . 70 7 Concluding Remarks 71 7.1 Concluding Remarks . 72 A GVS User Guide 75 A.1 Installation . 75 A.2 Startup . 76 A.3 GVS Main Window . 76 A.4 Visualizations . 79 A.5 Usage Example . 81 B GVS Developer Guide 85 B.1 Installation . 85 B.2 Developing a Visualization . 86 Abbreviations 91 Bibliography 93 xviii List of Figures 1.1 The Train Map of Graz . 3 1.2 InfoSky . 3 1.3 Napoleon’s Losses During the Invasion of Russia . 5 2.1 Graph Nomenclature . 11 2.2 Balance Between Aesthetic Criteria . 17 2.3 A Graph Drawing Taxonomy . 23 2.4 Automated Drawing of the Graz Tram Map . 24 3.1 Graphviz . 27 3.2 The AGD Demo . 30 3.3 The JUNG Demo Applet . 30 3.4 Pajek . 32 3.5 WilmaScope . 35 3.6 GEOMI . 35 3.7 Tulip . 37 3.8 GLuskap . 39 3.9 Walrus . 39 4.1 HVS............................................. 47 4.2 JMFGraph . 47 4.3 Multiple Visualizations and AbstractGraphs . 52 4.4 The Model View Controller of a GVS Visualization . 54 4.5 VirtualSpace and OverlaySpace . 55 5.1 Comparison of Force-Directed GVS Algorithms . 60 5.2 Comparison of StressMajorization and Dig-CoLa . 63 5.3 Projection . 65 5.4 Longest Path Layering . 68 A.1 The GVS MainWindow . 77 A.2 Progress Monitoring . 79 A.3 A GVS Visualization . 80 A.4 Open a GraphML File . 82 A.5 Final Layout . 83 A.6 Stepping . 84 xix xx Chapter 1 Introduction “ When you make a journey, always start with the first step. ” [ Proverb. ] In their most general form, graphs describe relationships of any kind between entities of any kind. Graphs are very common not only in science but also in nearly every part of everyday life. Finding meaningful ways of expressing graphs and transporting the information they contain is key. The process of creating a graphical representation of the information in a graph is called graph drawing. This chapter introduces the field of graph drawing..