1 / 39

Tree and Graph Drawing

Tree and Graph Drawing. Jiun-Hung Chen Feb. 17, 2005. Outline. Tree Drawing Graph Drawing. Tree Drawing. Why Trees?. Hierarchies File systems and web sites Branching processes Genealogy and lineages Decision processes Decision trees and Tournaments. Two Major Representations.

brownk
Download Presentation

Tree and Graph Drawing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tree and Graph Drawing Jiun-Hung Chen Feb. 17, 2005

  2. Outline • Tree Drawing • Graph Drawing

  3. Tree Drawing

  4. Why Trees? • Hierarchies • File systems and web sites • Branching processes • Genealogy and lineages • Decision processes • Decision trees and Tournaments

  5. Two Major Representations • Node-Link • Space Filling

  6. Node-Link Diagram • Common: Root at Top and Leaves at Bottom

  7. Classical Tree Drawing • How does one draw this? • DFS

  8. Potential Problems • For top-down, width of fan-out uses up horizontal real estate very quickly • At level n, there are 2n nodes • Tree might grow a lot along one particular branch

  9. 3D Approaches • Add a third dimension into which layout can go • Children of a node are laid out in a cylinder “below” the parent • Siblings live in one of the 2D planes

  10. Cone Trees Developed at Xerox PARC 3D views of hierarchies such as file systems Robertson, Mackinlay, Card ‘91

  11. Alternate Views

  12. 2D Hyperbolic Browser • Approach:Lay out the hierarchy on the hyperbolic plane and map this plane onto a display region. • Comparison • A standard 2D browser: 100 nodes (w/3 character text strings) • Hyperbolic browser: 1000 nodes, about 50 nearest the focus can show from 3 to dozens of characters Demo: http://www.inxight.com/

  13. H3Viewer Munzner, ‘98

  14. Centrifugal View Directions

  15. Contents Fisheye View • Downward tree of contents rooted at the context “User JMZ”

  16. Integrated Fisheye View

  17. Space-Filling Representation Each item occupies an area Children are “contained” under parent One example

  18. Treemap • Space-filling representation developed by Shneiderman and Johnson • Children are drawn inside their parent • Alternate horizontal and vertical slicing at each successive level • Use area to encode other variable of data items

  19. Internet News Groups NetScan Fiore & Smith Microsoft

  20. Applications • Can use Treemap idea for a variety of domains • Basketball statistics • Image Browser • Stock Market • See how U.S. presidential candidates compare with previous Presidents.

  21. Graph Drawing

  22. Why Graphs? • Connections throughout our lives and the world • Circle of friends • Computer networks… • Relational databases with keys • … • Model connected set as a Graph

  23. Applications • In information visualization, many applications • Subway routes • Social networks • Network analysis • Link analysis • Citation analysis • …

  24. What is a Graph? • Vertices (nodes)connected by • Edges (links) Adjacency list 1: 2 2: 1, 3 3: 2 1 2 3 0 1 0 1 0 1 0 1 0 1 1 2 3 2 3 Drawing Adjacency matrix

  25. Drawing Convention

  26. V = {1,2,3,4,5,6} E = {(1,2),(2,3),(1,4), (1,5),(3,4),(3,5), (4,5),(4,6),(5,6)} Graph drawing A maze Layout by Tom Sawyer Graph Drawing • Find an aesthetic layout of the graph that clearly conveys its structure. • Technically: Assign a location for each node and a route for each edge, so that the resulting drawing is “nice”. • Find an aesthetic layout of the graph that clearly conveys its structure • Technically: Assign a location for each node and a route for each edge, so that the resulting drawing is “nice”

  27. Graph Visualization Problems • Graph layout and positioning • Make a concrete rendering of abstract graph • Scale • Not too much of a problem for small graphs, but large ones are much tougher • Navigation • How to support user changing focus and moving around the graph

  28. Conflict Minimize edge crossings Maximize symmetry Aesthetic Criteria • Minimize edge crossings • Minimize area • Total edge length • Maximum edge length • Uniform edge length • Total bends • Maximum bends • Angular bends • Aspect ratio • Symmetry

  29. Layout Algorithms • Topology-Shape-Metrics • Hierarchical • Force-directed

  30. Topology – Shape – Metrics • Planarization • the graph is converted into a 2d drawing where the number of crossings are kept to a minimum. • Orthogonalization • the bends are made to go at right angles and the vertices are aligned. • Compaction • the dummy vertices are removed and the graph is made to take up a minimum amount of area

  31. Hierarchical • Layer Assignment • Each vertex is assigned a layer L, such that if there is an edge from u to v, u and u’s layer is Li and v’s layer is Lj, then i<j. If there is a gap in between layers, such as when there is an edge from L1 to L3, a dummy vertex is placed at L2 • Crossing reduction • the amount of times that edge cross over is reduced to create a more aesthetically pleasing drawing. • X-coordinate assignment • In this stage, all the points are assigned a position (x-coordinate), the dummy vertices are removed, and the edges are all drawn. In this stage many different aesthetics can be stressed such as minimizing bends or minimizing area.

  32. Force-directed • An energy model is associated with the graph • Ex: A spring model. (Repulsion + Attraction) • In a force model, the force produced is directly proportional to the distance between the vertices that make up the edge. • Low energy states correspond to nice layouts • Hence, the drawing algorithm is an optimization process Initial (random) layout Final (nice) layout Iteration 1: Iteration 2: Iteration 3: Iteration 4: Iteration 5: Iteration 6: Iteration 7: Iteration 8: Iteration 9: Demo: http://www.touchgraph.com/

  33. Other issues • Vertex • Shape,Color, Size, Location, Label • Edge • Color, Size, Label, Form • Scale • Run out of space for vertices and edges, slow down algorithm • Often use clustering to help • Extract highly connected sets of vertices • Collapse some vertices together

  34. 1981 http://www.mpi-fg-koeln.mpg.de/~lk/netvis/trade/WorldTrade.html

  35. 1992

  36. Summary • Tree and Graph Drawing • Important and useful tools for many applications • Interesting and important research directions • Large-scale, dynamic and efficient visualization

  37. Reference • http://www.cc.gatech.edu/classes/AY2002/cs7450_spring/ • http://graphics.stanford.edu/courses/cs448b-04-winter/lectures/treesgraphs/tree.graph.pdf • http://www.cs.brown.edu/people/rt/papers/gd-tutorial/gd-constraints.pdf • http://www.cs.umd.edu/hcil/treemap-history/ • http://davis.wpi.edu/~matt/courses/graphs/

More Related