The present invention generally relates to graph drawing and data visualization.
In graphically rich presentations of relational data, nodes may be represented as combinations of images, text elements, shapes, and other graphical elements. When drawing lines (i.e., edges) between such nodes, a drawing system needs to determine the clipping points, i.e., where to terminate the lines at their end nodes. In the case of various graph drawing algorithms (for example, orthogonal graph drawing algorithms, directed graph drawing algorithms with orthogonal edge routing, independent orthogonal edge routing algorithms, etc.), it is typically assumed that the nodes are rectangular boxes and that there must be some minimum separation between parallel edge segments. An example of such a graph drawing is shown in
Often times the node may not in fact be represented by a rectangular box, but may be represented by some other shape or by an image, as shown in
Sometimes a node may be a high-degree node, meaning that it has many lines that connect to it, or in other words, many incident edges. If there is a minimum separation required between the parallel routed edges incident to such a node, the node is forced to grow in size. Various problems may result. For example, since the area of the node is a quadratic function of the degree of the node, the node becomes over-emphasized or overly conspicuous as a result of its large size. Also, if the graphical representation of the node contains a low-resolution image, scaling the image to fit the larger calculated node area may result in pixelation or other visually distracting results. An example of a graph drawing illustrating these problems is shown in
In other instances, the node may not be allowed to be scaled. In various schematic applications, for example, users may impose very strict requirements in this regard, stemming from traditional industry hand-made or automatically-generated representations where the node may not change in size. Sometimes this size invariance is because the node reflects a strict physical property such as the size of a chip in a circuit, or a server in a wiring closet, or an element in an electrical schematic, or some other vertical market representation where time-honored practice or tradition guide the user's specification. Therefore, in some markets, the customers insist that the nodes must stay the fixed size that was specified.
Just as scaling the node may cause various undesirable results, the inability to scale the node because of user requirements may similarly lead to various undesirable results. For example, if the node degree is high, edges will need to be routed such that they violate the edge separation specification, as seen on the topside of the center node in
Summary
In one aspect, a computer-implemented method is provided for drawing a graph in which nodes are connected by edges, with the edges having a specified minimum spacing. A shape or image representing a node is displayed, and a bounding box enclosing the node is determined, with the bounding box being sized to satisfy the specified minimum spacing in relation to the bounding box. Outside the bounding box, placement of edges incident to the node is determined so as to satisfy the specified minimum spacing. Inside the bounding box, the edges are extended nearer to the shape or image without requiring that the specified minimum spacing be observed, and the edges incident to the node are displayed.
In another aspect, a non-transitory computer-readable medium is provided for drawing a graph with multiple nodes connected by multiple edges, with computer instructions for displaying a shape or image representing a node and determining a bounding box enclosing the node, the bounding box being sized to satisfy the specified minimum spacing in relation to the bounding box. The computer instructions ensure that outside the bounding box, placement of edges incident to the node is determined so as to satisfy the specified minimum spacing. Inside the bounding box, the edges are extended nearer to the shape or image without requiring that the specified minimum spacing be observed, and the edges incident to the node are displayed.
Description
The subject of this patent application is techniques for routing connecting lines (edges)tograph nodes, especially high-order nodes or constrained nodes, for improved readability and aesthetic appearance. An example of a drawing using such an approach is shown in
Referring to
The flowchart of
At 1205, the original nodes are restored with their original shapes or images. In one embodiment, the originally specified size of the nodes is preserved with the nodes being placed such that their center points coincide with the center points of the respective rectangles. Alternatively, various justification options may be specified to alter the placement of the node shape or image within its bounding box. For example, an imagemight be placed at the center, top left, top right, bottom left, bottom right, or in other user-specified locations within the “cage” of the bounding box.
At 1207, the edges are extended between nodes, using slope routing as needed. In one embodiment, the first portion and the last portion of each edge are extended such that they touch the precise shapes of their respective end nodes, or such that they extend to a tight rectangle around the shape. This may not be possible for some nodes because the line containing the edge does not intersect with the shape of the node, or because a pair of edges would introduce a new crossing near the node. In this instance, slope routing may be used when orthogonally routed edges are joined with the actual node using a straight-line segment sloped towards the center point of the node. The resulting graph drawing obtained from the intermediate graph drawing of
There may be other suitable routings inside the box (or at the edge of the box) besides slope routings. For example, the edges that are attached to a node box from the same side can be merged to form fork-like structures, as seen in
To accommodate “level-of-detail” changes where the graphical attributes and badges drawn on a node change dynamically at different zoom levels, the drawing application can be made aware of exactly which edge segments need to be newly sloped or rerouted when a node shape and graphics change under these level-of-detail changes. For instance, the application may define for each of various zoom levels a minimum size of a variable-sized rectangle that satisfies the largest of the graphical shapes at that zoom level. In this way, routings outside of this larger minimum-sized “cage” may be preserved, producing better and more stable routings. These more stable routings help users preserve their mental map of the information they are viewing as the drawing needs to change at different zoom levels.
In accordance with the techniques described, “overly-constrained” or “no win” solutions are replaced with intermediate approaches where the user's specifications can in large part be met. When this technique is combined with the integrated labeling technology of the present assignee, it is possible to produce compact, highly readable, overlap-free, orthogonally-routed drawings in all areas of the drawing that are outside of variable-sized rectangles of those nodes that have been forced to grow in size. This technique allows the following seemingly conflicting requirements to be met: 1) a node can have an arbitrarily high degree; 2) an automated drawing system should respect the specified image shape and dimensions; 3) an automated drawing system should respect the minimum edge separation; 4) an automated drawing should try to place node, edge, and connector labels such that they are overlap-free; and 5) an automated drawing system can respect the edge separation and route to nodes that have irregularly-positioned connectors.
Without the techniques described, it is not possible to satisfy these requirements at the same time without overlaps, ambiguity, and readability problems in the area outside of the variable-sized intermediate rectangles. With the techniques described, it is possible to produce drawings that respect all five of the requirements mentioned above at the same time.
Northbridge 115 and Southbridge 135 connect to each other using bus 119. In one embodiment, the bus is a Direct Media Interface (DMI) bus that transfers data at high speeds in each direction between Northbridge 115 and Southbridge 135. In another embodiment, a Peripheral Component Interconnect (PCI) bus connects the Northbridge and the Southbridge, Southbridge 135, also known as the I/O Controller Hub (ICH) is a chip that generally implements capabilities that operate at slower speeds than the capabilities provided by the Northbridge. Southbridge 135 typically provides various busses used to connect various components. These busses include, for example, PCI and PCI Express busses, an ISA bus, a System Management Bus (SMBus or SMB), and/or a Low Pin Count (LPC) bus. The LPC bus often connects low-bandwidth devices, such as boot ROM 196 and “legacy” I/O devices (using a “super I/O” Chip). The “legacy” I/O devices (198) can include, for example, serial and parallel ports, keyboard, mouse, and/or a floppy disk controller. The LPC bus also connects Southbridge 135 to Trusted Platform Module (TPM) 195. Other components often included in Southbridge 135 include a Direct Memory Access (DMA) controller, a Programmable Interrupt Controller (PIC), and a storage device controller, which connects Southbridge 135 to nonvolatile storage device 185, such as a hard disk drive, using bus 184.
ExpressCard 155 is a slot that connects hot-pluggable devices to the information handling system. ExpressCard 155 supports both PCI Express and USB connectivity as it connects to Southbridge 135 using both the Universal Serial Bus (USB) and the PCI Express bus. Southbridge 135 includes USB Controller 140 that provides USB connectivity to devices that connect to the USB. These devices include webcam (camera) 150, infrared (IR) receiver 148, keyboard and trackpad 144, and Bluetooth device 146, which provides for wireless personal area networks (PANs). USB Controller 140 also provides USB connectivity to other miscellaneous USB connected devices 142, such as a mouse, removable nonvolatile storage device 145, modems, network cards, ISDN connectors, fax, printers, USB hubs, and many other types of USB connected devices. While removable nonvolatile storage device 145 is shown as a USB-connected device, removable nonvolatile storage device 145 could be connected using a different interface, such as a Firewire interface, etcetera.
Wireless Local Area Network (LAN) device 175 connects to Southbridge 135 via the PCI or PCI Express bus 172, LAN device 175 typically implements one of the IEEE 802.11 standards of over-the-air modulation techniques that all use the same protocol to wirelessly communicate between information handling system 100 and another computer system or device. Optical storage device 190 connects to Southbridge 135 using Serial ATA (SATA) bus 188. Serial ATA adapters and devices communicate over a high-speed serial link. The Serial ATA bus also connects Southbridge 135 to other forms of storage devices, such as hard disk drives. Audio circuitry 160, such as a sound card, connects to Southbridge 135 via bus 158. Audio circuitry 160 also provides functionality such as audio line-in and optical digital audio in port 162, optical digital output and headphone jack 164, internal speakers 166, and internal microphone 168. Ethernet controller 170 connects to Southbridge 135 using a bus, such as the PCI or PCI Express bus. Ethernet controller 170 connects information-handling system 100 to a computer network, such as a Local Area Network (LAN), the Internet, and other public and private computer networks.
While
The Trusted Platform Module (TPM 195) shown in
It will be appreciated by those skilled in the art that the present invention can be embodied in other specific forms without departing from the spirit or essential character thereof. The foregoing description is therefore intended in all respects to be illustrative and not restrictive. The scope of the invention is indicated by the appending claims, not the foregoing description, and all changes which come within the meaning and range of equivalents thereof are intended to be embraced therein.