Survey of treemap techniques
by Thomas Kerwin
Источник: http://www.cse.ohio-state.edu/~kerwin/treemap-survey.html
The Beginning
The original invention of the treemap visual layout was developed by Ben Schniderman as a way to more easily get a feel for the directory structure on his computer. The traditional approach to displaying tree data utilizes a symbol for each node and lines connecting the nodes for each edge in the tree. This does work, and works very well for small trees. However, when the same approach is used for large trees with hundreds of nodes, the display quickly becomes cluttered with nodes and lines. There are two obvious solutions to this problem, zoom out on the nodes so all of them can fit on the display, or let the user pan around a full size tree. Neither of these are very satisfactory. Schniderman came up with a different way to show hierarchical data. The treemap starts with a rectangular space and subdivides it recursively. The initial rectangle represents the root node of the tree. That space is divided into a number of horizontally aligned subrectangles, each representing a child of the root node. On each recursive call, the direction of subdivision is rotated: horizontal, then vertical, then horizontal. This way of representing a tree gives two main benefits. The first is that the main connectivity relationship of the tree, ancestry, is shown with unambiguous graphical relationships. Children of a node are enclosed within that node and parents of a node contain that node. The other benefit is that there is little wasted space in the diagram. The entire original rectangle has been filled with smaller rectangles. The treemap is an especially good visualization for tree structures in which each leaf node has a weight value associated with it. A weight value is any numeric value that all the nodes share and can be aggregated. This might be file size, in the case of Schniderman's original problem, or physical weight, monetary value, sugar content, etc. The weight of the nodes can be used to influence their size on the screen. A low weight node might be displayed as a very small rectangle next to a high weight sibling. And just like the traditional method of displaying trees, the color and style of the rectangle can be used to convey information about the node.
Subdivision Algorithms
After the initial development of the treemap, many extensions were added to the basic idea. One class of improvements regards the nature of the subdivisions that are used to section the rectangles. Standard treemaps often produce many elongated rectangles, especially when there are many children of a particular node. This was seen as a problem by Mark Bruls, Kees Huizing, and Jarke J. van Wijk, the developers of the squarified treemap subdivision algorithm. Thin rectangles can be difficult to interact with: clicking on a particular one with a mouse takes considerable manual dexterity and comparison of the sizes of two rectangles is difficult when the aspect ratios are significantly different. The squarified treemap attempts to fix these problem by dividing the space into regions having an aspect ratio close to one. In the same paper, the authors introduce frames around nodes as a way to enhance the structure of the treemap. This is needed when using squarified treemaps since child nodes are no longer laid out in a simple, linear manner. This manner provides users of the original treemap layout with cues for identifying sibling relationships. The frame approach gives explicit information that replaces these cues.
Visual Improvements
In an attempt to enhance both user satisfaction with the appearance of treemaps and user intuition about hierarchy information, Jarke J. van Wijk and Huub van de Wetering developed a shaded treemap display they called the cushion treemap. The cushion treemap was developed to help users distinguish detail in deeply nested hierarchies. When treemaps become very deep, it becomes increasingly difficult to identify the different levels of the treemap visually. Also, levels become difficult to distinguish in squarified treemaps of well-balanced trees. The cushion treemap algorithm is an illumination algorithm. At each subdivision level, a height function is added to the smaller rectangles. This height function is accumulated through many subdivisions, with each subdivision providing a higher frequency but lower amplitude component. When no more subdivisions can be done, the node is drawn on the screen with per-pixel illumination. The height function provides the normal for each pixel in the leaf node. The developers of the cushion treemap have a freely downloadable implementation of the technique called SequoiaView. It can be used to view the file distribution on a Windows system.
Three-Dimensional Extensions
There have been two main attempts to extend the two-dimensional display of a treemap into three dimensions. Displaying in three dimensions certainly has some inherent advantages, such as more intuitive roaming and zooming. One extension into 3D is the information cube designed by Jun Rekimoto and Mark Green. The information cube uses a hierarchy of nested rectangular prisms to represent the tree instead of nested rectangles. The benefit of this representation over two-dimensional treemaps is data density. In a three-dimensional space, The nested box approach of the information cube comes with significant problems. The most basic is occlusion. Rendering solid prisms prevents the user from viewing child nodes, since they are within an opaque object. However, rendering wireframe cubes proves too confusing. The authors' solution is to render the prisms as semi-transparent objects. Another problem involves selecting nodes in the tree. Picking an object in three-dimensions with a two dimensional pointing device has inherent ambiguities. In the information cube, these ambiguities can not be easily rectified by simple transformation of the cube and must be addressed using more complex techniques. Another three-dimensional extension of the treemap is StepTree, developed by Thomas Bladh, David A. Carr, and Jeremiah Scholl. In StepTree, the algorithm starts with a large, flat rectangular prism which represents the root node. To display children nodes, the prism is subdivided into blocks using a variant of the squarified algorithm. However, the new prisms are translated in the direction perpendicular to the large face on the root prism. In this way, a stairstep-like geometry is created.
Application of Treemaps
Treemaps have been used for a wide array of hierarchical data. NewsMap is an online application that takes news topics from the front page of Google News and displays them in a treemap format. Topics are divided into different regions by category and their size is controled by the number of related articles reported by Google.
Conclusion
Treemaps have a low learning curve, both for users of applications that take advantage of them and for programmers who implement them. The basic idea is easy to understand. They can add to insights in viewing either shallow or deep trees. They can also provide users with an overview of a large and complex tree structure more quickly than a traditional node and edge display can. The efficient use of space lessens the need for panning and zooming. Treemaps are very good at displaying trees where the data allows aggregation of child weights into the weight of the parent node. Although the basic treemap is easy to implement, there are many small variations on the theme that can be performed, either in data subdivision or data display. This makes it an interesting and rich area of further research. Trees are a common structure of data in the world, whether it's business data, filesystem data, or biological data and treemaps will continue to be a popular method to visualize those data.