Abstract
Word clouds provide an effective way to visually summarize important keywords from a large collection of text. Despite their increasing popularity, relatively less attention has been paid on developing interactive techniques for flexible word cloud navigation and manipulation. In this article, we present a focus + context display technique to support multifaceted viewing of word clouds. In our algorithm, the sizes of words in a word cloud are first changed to reflect the current importance metric selected by the user and then scaled to balance space utilization and word readability. To remove word overlaps caused by changes of sizes while maintaining the positional dependency modeled by a directed acyclic graph, we propose a force-directed model that also maximizes the utilization of display space. We demonstrate the effectiveness and usefulness of our techniques through case studies using a real-world dataset and evaluate the performance of the constraint-based overlap removal method in achieving stable layouts during importance transformation.
Keywords
Introduction
Word clouds have been widely used as a visual communication tool for users to quickly learn important words from a large collection of text. While the display and representation of word clouds1–4 have been widely studied by information visualization researchers, interaction of word clouds is often relegated to a secondary role. This is because the importance, and hence the size of a word in a word cloud, is typically determined by a fixed criterion. Once the cloud is displayed, the image of the word cloud will remain static. In many real-world applications, however, the importance of a word can change based on the user’s intention in using text. For instance, consider a collection of National Basketball Association (NBA) players as the words in a word cloud. Each player is associated with multiple facets: points, rebounds, assists, steals, blocks, and so on. A word cloud visualization of NBA players allows one to understand the players’ performance based on any one of the above criteria. Frequently, the players need to be analyzed in different aspects and hence the user will use different measures to determine the size of the words in a sequence. In a different scenario, the user may choose to browse the players by the teams that they belong to. The user can choose one or multiple teams to view details on demand, and the importance of the players will change depending on whether they are in the team of interest. To ensure a stable viewing experience as the user moves across a large information space with multiple facets using word clouds, the main issue to address is how to adjust the layout of the word cloud dynamically while preserving the user’s mental map during the transformation of importance, reflected by the size of words. This is important because without preserving a proper context for effective tracking of the words, the user may quickly lose his or her focus and cannot find the relevant words displayed in a totally different layout.
Interaction is an integral part of information visualization.5,6 Without interaction, a word cloud visualization becomes merely a static image, which significantly limits its use as a fundamental data exploration tool. While some researchers have previously addressed issues related to interactive manipulation of word clouds,7,8 their works are primarily focused on improving the display of word clouds (such as modifying the color, position, or orientation of a word), and thus, the interaction of word clouds for visual exploration is still an open problem. In this article, we present a focus + context display technique to support multifaceted viewing of word clouds. By multifaceted, we mean the importance of the words can change as the user changes the criterion with which he or she ranks the importance of the words. Focus + context display techniques such as fisheye lens 9 provide a good balance between the local detail and the global context simultaneously. In this work, focus + context is used to highlight more important words with large font sizes, while preserving the contextual words in the surrounding without affecting the overall readability of the word cloud. The focus words can be selected based on one facet chosen by the user, such as points per game in the NBA players example, or explicitly selected by the user by a mouseover to a word followed by semantic zooming, 10 that is, selecting words of interest as the foci, with additional words introduced to augment the information presented by the word cloud.
In our algorithm, non-focus words are displayed as the context to facilitate effective navigation and tracking. The sizes of the words after importance transformation are scaled to balance space utilization and word readability. To remove the overlaps caused by changes of word sizes while maintaining positional dependencies, we propose a force-directed model to solve the constraints specified by a directed acyclic graph (DAG) to adjust the layout and maximize the utilization of display space. We demonstrate the effectiveness and usefulness of our techniques through case studies on NBA player data and quantitatively evaluate the values of the constraint-based overlap removal approach compared with a competing method. The major contributions of this work are as follows:
A focus + context display technique to support multifaceted viewing and navigating of word clouds. It preserves the user’s mental map while the importance of words is changed when the user browses through the information with multiple facets. Our technique also supports semantic zooming by introducing additional words that are relevant to the selected words.
An overlap removal method that preserves the positional dependencies among the words, while maximizing the utilization of display space. Based on a dependency graph that models positional dependencies among the words, a force-directed model is employed to solve the constraint-based overlap removal problem.
Related work
Originating from social tagging on the Internet, word clouds have been used to display keywords from text collections. Many Eyes, 11 Wordle, 7 and other online visualization tools enable users to create their own word clouds from text collections. Lohmann et al. 12 showed that no single best layout can be suitable for all word clouds. Considerable research has been done in word cloud layout adjustment. Tag Maps 13 placed tags on maps to summarize topics of photos in different places. Kaser and Lemire 14 used Electronic Design Automation algorithms to pack layout for HTML-based word clouds. Seifert et al. 15 proposed a region clipping method for placing words in a better shape. Wordle 7 allowed flexible orientation of word clouds in a compact layout, and Mani-Wordle 8 supported user control over the layout of a word cloud. Collins et al. 1 introduced parallel tag clouds by integrating both parallel coordinates and tag clouds. Cui et al. 2 proposed coherent layouts for dynamic word clouds. Wu et al. 16 created semantic-preserving word clouds by leveraging tailored seam carving. ProjCloud 4 achieved a semantically consistent layout from a set of documents. Besides, there have been studies to evaluate display utility in a word cloud. Rivadeneira et al. 17 found that larger words are easier for people to recognize and remember. Halvey and Keane 18 also showed that a larger font size is often important for users to find information quickly and easily.
Focus + context display techniques have been widely used in interactive exploration of large datasets for various information visualization applications, such as tables, 19 trees,20,21 graphs, 22 maps, 23 treemaps, 24 metro maps, 25 and hybrid visualizations. 26 Stoffel et al. 27 proposed a focus + context display technique to improve the readability of document thumbnails. ViSizer 28 adapted the focus + context technique in resizing visualizations. However, existing focus + context methods are not suitable for word cloud visualization when the sizes of words change dynamically since they can result in either word overlaps or empty spaces among words. Many overlap removal algorithms were discussed and compared by Strobelt et al., 29 but they ignored the boundary constraint and did not consider the issue of space utilization when removing word overlaps. Eppstein et al. 30 proposed an optimization approach for matching a layout with overlaps to a grid layout, but it can only deal with nodes of the same bounding areas. In the graph drawing community, constrained optimization is used to create constrained graph layouts. Dwyer 31 proposed a constraint relaxation scheme to satisfy orientation, circular or non-overlap constraints for large graphs. Dwyer et al. 32 also tried to preserve the orthogonal order in graph layouts using a quadratic programming algorithm. Our approach is to satisfy the orthogonal order and space boundary constraint, while removing overlaps of words of varying sizes heuristically.
Multifaceted viewing of word clouds with focus + context display
In this section, we first describe typical usage scenarios for multifaceted viewing of word clouds and then highlight the principles for designing a focus + context display to support multifaceted viewing of word clouds. After that, we describe the algorithms used for creating focus + context display of word clouds.
Usage scenarios
In many visual exploration applications, the importance of a word can change based on the user’s goal when visualizing the text collection. In one scenario, a word can be associated with multiple measures of importance. Each measure describes one facet of the word from the data. Although one can always combine multiple measures to form a single importance, in practice, users may need to examine different facets of the words in a sequence. For instance, when looking at a word cloud of NBA players, one may first want to rank the players based on the points they have scored, and then focus on the minutes they have played on average, and next compare their salaries in the league. In another scenario, different users may show different degrees of interest to the words in the same word cloud, such as the players of different teams in our NBA example. This is common when there are a large number of words in a word cloud, and one is likely to choose and focus on a portion of words with higher interest. Both scenarios require multifaceted viewing of word clouds.
The goal of this work is to support multifaceted viewing of word clouds with focus + context display techniques, which provide a good balance between the local detail and the global context simultaneously. In the first scenario, when switching the focus and context, the importance transformation will change the sizes of all the words in the word cloud to reflect the relative importance of the newly selected facet. In the second scenario, to present more detailed information of the words in focus, semantic zooming 10 is adopted to display additional words that are semantically related to the focus in the nearby locations, while still maintaining a global view of the context. In this way, the user can learn new information related to the words of interest as he or she interacts with the word cloud.
Design principles
To achieve a desired focus + context display of word clouds, we identify the following requirements:
(P1) Transforming the word cloud without geometric distortion. The original geometric shape of words should be preserved as they are the most prominent property to maintain the words’ readability. Therefore, geometric distortion that is commonly used in conventional focus + context techniques should be avoided during the transformation.
(P2) Maximizing the utilization of display space. Because display space is precious, especially for smaller devices, the placement of words should maximize space utilization.
(P3) Maximizing the number of legible words in context. It is necessary to avoid displaying words in context that are too small to be legible after transformation, but in the meanwhile to keep the number of displayed words maximum with consistent relative importance.
(P4) Removing overlaps while preserving spatial proximity. Changing the word sizes is very likely to introduce word overlaps. Spatial coherence should be preserved to maintain the user’s mental map while removing word overlaps.
(P5) Constraining words within the display space. After importance transformation, scaling, and overlap removal, words should always be displayed within the given display space to prevent loss of information.
(P6) Allowing users to switch focus and context smoothly. All changes in the focus + context transformation should be done smoothly to maintain the user’s mental map during transformation.
Space-optimized scaling
Since importance transformation may drastically change the sizes of words, it can result in a word cloud of poor readability (as shown in Figure 1(a)). As discussed in section “Design principles,” a desired focus + context display should maximize the utilization of display space (P2) as well as the number of legible words (P3). While one can uniformly scale the whole word cloud to fit the display space, some words may be still too small to be legible, particularly when many words are very large after scaling, or too many additional words are introduced. To amend this problem, we opt to filter out the less important words in context to make room for the more important words, whose sizes can then be adjusted to make them legible with the additional space. Although the total number of words in context will reduce in the resulting word cloud, the information conveyed in the new word cloud will increase due to an increase in the number of legible words.

Improving the readability of a word cloud with the space-optimized scaling (SOS) algorithm and our force-directed model. It first identifies and adjusts words in the (a) initial word cloud that are too small with an optimal degree of efficiency e and then removes (b) word overlaps in the word cloud while refining the layout with the positional dependencies and constraints preserved using our force system. During the process, three less important words in (a) are filtered out, resulting in the (c) final word cloud.
To determine the number of words in context to be removed with regard to the available display space G, we define the degree of efficiency e for measuring space utilization
where Bi is the bounding area of word i, N is the number of words, and
where f is the original font size and f* is the adjusted font size for each word, fmin is the smallest font size in the word cloud, and flegible is a user-defined legible font size. Namely, words of font size f*≥flegible are considered as legible words. We opt to set flegible = 12 (point) in our experiments. In general, this option can preserve the relative importance of words when resizing a word cloud. We note that users can design their own resizing criteria that might be more suitable to handle special cases in their applications. Clearly, an optimal degree of efficiency e will attain maximal utilization of the available display space. However, in practice, an optimal e is hard to determine since it depends not only on the bounding area of the words but also on the gaps between words of different sizes and in different alignment. To solve the problem, we employ a bisection process to remove the least important words in context until all words are legible with an optimal e and display a maximum number of the more important words. We call it the space-optimized scaling (SOS) algorithm, which is described in Algorithm 1. We first keep the focus words in the display and then select the maximum number of the largest context words (candidate words) that gives e≤ 1 after font size scaling (this can be done by repeatedly including the largest non-candidate context word as a candidate word and checking whether e > 1 after scaling). Next, we perform a binary-search-and-test using our force system (described in section “Force-directed model”) to remove the smallest candidate words until the whole word cloud can fit the display space without overlap.
With the SOS algorithm, we are able to transform a word cloud of poor readability (shown in Figure 1(a)) to a much more effective one (shown in Figure 1(b)), where all words are legible with an optimal e. Our force system (described in section “Force-directed model”) then refines the layout with the positional dependencies and constraints preserved (described in section “Layout constraints”) to create an overlap-free word cloud (shown in Figure 1(c)).
Layout constraints
After importance transformation and SOS, the main issue to address is how to adjust the layout of the word cloud while preserving the user’s mental map. Some words can overlap other words because their sizes are changed or new words are introduced. To remove word overlaps, previously researchers have shown that an orthogonal ordering invariant can be fairly effective in preserving spatial proximity.29,30 In our case, since the word cloud after transformation and scaling is already dense, preserving the orthogonal order can approximately minimize the total displacement, a time-consuming process if solved using optimization approaches. 30 In our algorithm, we consider orthogonal order as one important criterion to reflect the positional dependencies among the words. To develop a better overlap removal algorithm that satisfies the design principles P4 and P5, we analyze the positional dependencies and constraints among the words before the layout adjustment.
Positional dependency
To provide a consistent view between the original and the transformed word clouds, the positional dependencies in the orthogonal order should be preserved to produce a visually stable layout. For example, in the word cloud shown in Figure 2(a), the horizontal order of words is WordA → WordB → WordC → WordD → WordE, and the vertical order of words is WordA → WordC → WordE → WordB → WordD. With both horizontal and vertical orders preserved, the resulting layout will be very similar to the original layout and thus have a consistent view when the focal area is changed. We introduce a directed graph, called dependency graph, to model these positional dependencies. A word cloud has two dependency graphs that model the horizontal and vertical positional dependencies separately, denoted as Gx and Gy, respectively. A dependency graph is essentially a DAG as a result of the partial dependency order among the words. Figure 2(b) and (c) depicts the dependency graphs Gx and Gy of the word cloud in Figure 2(a), respectively. The positional dependencies are preserved if and only if the dependency graphs are topologically the same before and after layout adjustment.

Positional dependency: (a) some words in a word cloud, (b) the dependency graph Gx of (a), and (c) the dependency graph Gy of (a).
Positional constraints
Besides the positional dependencies among the words, the layout also has several other positional constraints to consider during adjustment. One constraint is that one word must not overlap another word since occlusion would dramatically decrease word readability. Another constraint is that words must not go out of the display boundary. Although one can always uniformly resize the entire word cloud to fit in the display boundary when needed, it will reduce the size of every word and may in turn impair the effect of SOS. More importantly, it could also lead to poor utilization of space if the aspect ratio of the bounding box of the resulting word cloud does not match that of the display area. Therefore, a better way to solve this problem is to add a constraint for the words to stay inbound when adjusting the word cloud layout.
Force-directed model
While there exist several overlap removal algorithms for preserving orthogonal order during overlap removal, they do not handle the aforementioned two constraints simultaneously. Heuristic methods such as Rolled-out Wordles 29 ignore the boundary constraint, while optimization methods such as point set matching 30 can only deal with words with an equal bounding area, and are often time-consuming and thus inappropriate for interactive focus + context word clouds. To satisfy the positional dependencies and constraints among the words, we build a force system to determine the layout of the word cloud. The force system consists of three forces: a dependency force, a boundary force, and a repulsive force.
The dependency force is a spring force that ensures that the positional dependency between two words is preserved; it corresponds to maintaining the topology of the dependency graphs. During the layout adjustment, if an edge in a dependency graph is inverted, the dependency force between the two words takes effect and will adjust their positions either horizontally (corresponding to the dependency graph Gx) or vertically (corresponding to the dependency graph Gy) to recover the original orthogonal order. The horizontal dependency force is formulated as
where
The boundary force is an attractive force that pulls the words that fall outside the display boundary back. Since words are not just points but have finite area, the actual display area
where

Illustration of the force-directed model: (a) the word clouds with regard to the display area
The repulsive force prevents a word from being occluded by any other word. It exists between any pair of words if and only if they overlap each other. We decompose a repulsive force into forces in the horizontal and vertical directions. The horizontal repulsive force is formulated as
where kr is a weighting coefficient of the repulsive force,
Figure 3 illustrates the effect of the three forces. First, the top three figures show an initial layout of a word cloud (Figure 3(a)) with its corresponding dependency graphs Gx (Figure 3(b)) and Gy (Figure 3(c)). Since WordC is occluded by WordA, the repulsive force takes effect between these two words to remove the overlap. Second, the middle three figures show an intermediate layout of the word cloud (after removing the overlap between WordA and WordC) and their corresponding dependency graphs. From the dependency graph Gx, we can see that the edge (D, A) is inverted to (A, D), so the dependency force starts to push WordA and WordD horizontally to recover the original relation. Similarly, the dependency force affects WordA and WordB to move vertically due to the existence of an inverted edge (B, A) in Gy. Besides, since WordC is outside the display area G, the boundary force takes effect to push it back. Third, the bottom three figures show the final layout of the word cloud as well as the corresponding dependency graphs. WordC is inside the display area, and the orthogonal orders of WordA and WordB and WordA and WordD are well preserved—the dependency graphs are topologically the same as those of the initial word cloud.
In our implementation, we employ an iterative process to adjust the positions of words under the three forces. For each word, the order of the forces applied is dependency force, boundary force, and repulsive force. The force system will converge when the words fit in the available display space without overlapping, and also when the dependency graphs have the same topology. To ensure that no word will go out of the display boundary, the boundary force is given a higher weight than the other two forces (namely set kb > kd and kb > kr). In our experiments, we found kb = 0.1, kd = 0.01, and kr = 0.01 generally allow a quick convergence. We note that if the words have not been scaled appropriately to fit the display area (namely, before the word cloud is refined by the SOS algorithm), it may be difficult for the force system to converge with strict positional dependencies. To alleviate this problem and achieve a faster bisection process, when using the force system to find the optimal degree of efficiency e in the SOS algorithm, we relax the dependency constraint with a smaller weight kd = 0.001 in step 7 and reset kd = 0.01 in step 11 of the SOS algorithm to obtain the final layout.
Time complexity
Now, we discuss the time complexity for generating the focus + context display of word clouds with N words. The dependency graphs for an initial word cloud can be generated by sorting the words according to their x and y coordinates, respectively, which can be done in O(NlogN). As a result of the partial order in the dependency graph, for each word, the dependency force can be considered only between it and its parent or child node in the graph, and thus taking O(N) time. The boundary force contributes O(N) time, and the repulsive force can take O(N2) time in the worst case. Therefore, the total time complexity is O(c(N2+N) +NlogN), where c is the total number of iterations in the force-directed adjustment. Although we have not yet specifically optimized the performance such as using a scan-line algorithm to find all the overlaps in O(kN(logN+k)) time, 33 our system can achieve smooth focus + context word cloud transition interactively for several hundreds of words, which is common for most word cloud applications. More details about the actual central processing unit (CPU) running time are shown in section “Quantitative study.”
Evaluation
In this section, we first show the usefulness of our techniques with case studies on NBA player data and then quantitatively evaluate the values of our constraint-based overlap removal method in achieving stable layouts during importance transformation.
Case study
We implemented the focus + context display system using HTML5 and JavaScript. The main benefit of a web-based system is that it is independent of platforms and operating systems, and users can access it from any device with a browser that supports HTML5 without installation and maintenance. An interactive demonstration is presented in a video that accompanies this article.
To demonstrate the effectiveness of the focus + context display of multifaceted word clouds, we used our system to explore the NBA dataset, 34 which consists of 442 players from 29 NBA teams during the 2000–2001 season. To generate a semantically clustered word cloud, players of the same team are first placed nearby as a semantic group. Each group is encoded with a color different from its neighboring teams, and the initial size of a word is proportional to the points per game that the corresponding player scored. The coordinates of the words are scaled to fit in the display space and adjusted by our force-directed model to remove word overlaps while preserving positional dependencies and constraints.
In the first case, we explored the players with different importance metrics. Seven metrics are considered: points, rebounds, assists, steals, blocks, games, and minutes, shown in the control panel below the word cloud (see Figure 4). The top 200 players with the highest scores are selected to form an initial word cloud, with their importance measured by the “Points” metric (highlighted in a distinct color in the control panel), as shown in Figure 4(a). Judging by the relative sizes of words, we can observe that some of the scoring leaders are Bryant (Kobe Bryant from Los Angeles Lakers), O’Neal (Shaquille O’Neal from Los Angeles Lakers), McGrady (Tracy McGrady from Orlando Magic), and Iverson (Allen Iverson from Philadelphia 76ers). After selecting the “Assists” metric in the control panel, the importance of each word is transformed to a new value proportional to the number of assists, and the resulting word cloud after scaling and layout adjustment is shown in Figure 4(b). As we can see, although the sizes of words have changed, their relative positions are well maintained—players of the same team are still close to one another, thus preserving the user’s mental map. In addition, the words in the newly selected facet do not overlap one another after changes of sizes and are still legible within the display bounds. From the new focus + context word cloud, we can observe that some of the top supporting players are Kidd (Jason Kidd from Phoenix Suns), Stockton (John Stockton from Utah Jazz), and Bibby (Mike Bibby from Vancouver Grizzlies), which are quite different from the scoring leaders.

Word clouds of NBA players in the 2000–2001 season: (a) a word cloud of players with the focus on the scoring leaders, ranked by the points they scored, and (b) the same word cloud with the focus on the top supporting players, ranked by the number of assists they made.
In the second case, we navigate the players who belong to different teams with different degrees of interest. Figure 5(a) shows a word cloud of the top 150 players with the highest scores. The focus + context display technique allows one to focus on one or multiple teams, where the players in focus are highlighted with additional players from the same team while the other teams are presented as the context. For instance, from the initial word cloud shown in Figure 5(a), we focused on Mason (Anthony Mason from Miami Heat) and Webber (Chris Webber from Sacramento Kings) simultaneously. Figure 5(b) shows the resulting focus + context display. We can observe that the key players (such as Mason, Jones, Webber, and Stojakovic) from the initial word cloud are magnified as a result of zooming, with their respective teams in focus, and more team members added close to the magnified players in clear view. For example, we can see that new players such as Bowen, House, and Davis (from Miami Heat) as well as Anderson, Barry, and Pollard (from Sacramento Kings) appear in the zoom-in view. We can also observe that the global context is preserved and words remain legible because several relatively less important players (such as Oakley and Williams around Carter in the bottom left of Figure 5(a)) were removed to make room for the more important ones.

Word clouds of NBA players in the 2000–2001 season. (a) An initial word cloud of 29 NBA teams represented by top players, where the players from Miami Heat and Sacramento Kings are highlighted by ovals. (b) The focus + context display semantically zooms in to Miami Heat (in cyan) and Sacramento Kings (in orange). In addition to the top players shown in (a), more players from the two selected teams are shown close to the magnified top players in (b).
Quantitative study
In the above case studies, we show that our system can preserve a consistent look before and after switching the focus and context, while keeping all words within the display area and free of overlaps. Now we present a quantitative evaluation to study how our overlap removal method performs compared with a competing method in terms of generating consistent layouts. Among several existing overlap removal algorithms, the closest to our work is the force-directed model proposed by Cui et al. 2 Aiming at maintaining the topology of a Delaunay triangulated graph while removing empty space between the words, the graph-based force-directed model in Cui et al. 2 (denoted as GFD) consists of three forces: a spring force (for removing empty space between two words), a repulsive force (for removing overlap between two words), and an attractive force (for penalizing triangle flips). We compared the performance and quality of GFD and our constraint-based force-directed model (denoted as CFD)—both were implemented using JavaScript and HTML5. The dataset in use is the same as in the case studies. All the results were generated in Google Chrome on an Intel Core i7-2600 CPU at 3.40 GHz desktop.
Besides measuring the computational performance of the two methods, we employed three metrics adapted from Strobelt et al. 29 to measure their quality, namely, Euclidean displacement, orthogonal ordering, and size increase.
Euclidean displacement (ED) is a typical metric to measure the proximity relation between two layouts.2,29 Given an original layout L, a resulting layout
where
Orthogonal ordering (OO) measures the percentage of pairs of words that have the same directional relation between two layouts L and
where i and j represent two different words,
Size increase (SI) measures the size increment in the bounding area A of a word cloud from an original layout L to a resulting layout
This allows us to determine the relative change in the size of a word cloud and measure how much area is needed to display the representation.
Starting from a compact word cloud containing 442 NBA players (the one we have generated in section “Case study”), we first uniformly scaled the words by the SOS algorithm to obtain a legible word cloud with various degrees of word overlaps. We generated such word clouds with N legible words (N is chosen roughly as 50, 100, 150, …, 400) by adjusting the value of flegible (in the SOS algorithm) correspondingly. Then, the two methods, CFD and GFD, were tested for overlap removal. GFD stops when there is no overlap between any pair of words. Table 1 summarizes the average values of various measurements for the two methods. While the two methods are equally good for maintaining the orthogonal ordering, CFD yields smaller Euclidean displacement than GFD. One possible reason is that the scaled word clouds are too dense for GFD to work appropriately, without stretching for more space to remove overlaps. In contrast, CFD better handles this problem when trying to preserve the spatial proximity and thus produces a more compact word cloud. While the dependency force in CFD can maintain most directional relations among the words, words close to the boundary may have to be pushed further horizontally or vertically, as a result of the boundary force. The compromise between these two forces explains why CFD preserves a similar (rather than larger) amount of orthogonal ordering in comparison with GFD. In terms of size increases, GFD results in around 54% increment in the size of the word cloud, while CFD roughly keeps the original size. This is consistent with the argument in Cui et al. 2 that GFD may lead to irregular shapes and thus cannot utilize the available display area very well, due to the increase in the bounding area of the word clouds. Figure 6 shows a visual comparison of the word clouds after removing overlaps with GFD and CFD. We can observe in Figure 6(b) that many words fall either on or outside the boundary of the display space after applying GFD. In contrast, we can see in Figure 6(c) that CFD works better than GFD in preserving the size of the word cloud. While Euclidean displacement and size increases of GFD can be improved by scaling down the layout, doing so would shrink the sizes of words by over 30%, which is clearly unacceptable. The computational performance of the two methods is illustrated in Figure 7. From Figure 7(a), we can see that the CFD usually takes more iterations because the converging condition is stricter than GFD. However, from Figure 7(b), we can observe that in each iteration step, CFD is much more efficient than GFD. This is because GFD needs to update the positions of words under the spring force between any two connected words (in the triangulated graph) with empty space. Therefore, the total computation time of GFD grows more sharply than CFD as the number of words increases (shown in Figure 7(c)). In this sense, CFD is more scalable than GFD for overlap removal within a constrained display space. For instance, it takes roughly 11 s for GFD to remove overlaps of around 400 words, while CFD only takes about 1 s. In summary, while preserving similar directional relation in comparison with GFD, CFD is more effective in preserving the spatial proximity and the size of the word clouds. CFD is also more efficient for removing overlaps while maintaining the positional dependencies and constraints.
Average values of the quantitative measurement for the force-directed model in Cui et al. 2 (GFD) and our force-directed model (CFD).
GFD: graph-based force-directed model; CFD: constraint-based force-directed model.
Compared with GFD, CFD yields smaller Euclidean displacement and size increase and performs similarly in preserving orthogonal ordering.

Comparison of two force-directed algorithms: (a) a word cloud after space-optimized scaling, (b) a word cloud created from (a) using a previous force-directed model in Cui et al. 2 (GFD), and (c) a word cloud created from (a) using our constrained force-directed model (CFD).

Comparisons of algorithm speed between the force-directed model in Cui et al. 2 (GFD) and our force-directed model (CFD) with varying numbers of words: (a) the number of total iterations, (b) the averaged time spent in each iteration, and (c) the total CPU time.
Conclusion and future work
In this article, we introduce a focus + context display technique to support multifaceted viewing of word clouds. Our design provides a balance between displaying the local detail at the focus of the user’s interest and the global context, by taking into account the multifaceted importance of the words. In our algorithm, the sizes of words in a word cloud are first changed to reflect the current importance metric selected by the user and then scaled to balance space utilization and word readability. To remove word overlaps caused by changes of sizes while maintaining the positional dependency modeled by a DAG, we propose a force-directed model that also maximizes the utilization of display space. We show the usefulness of our techniques through case studies on NBA player data and quantitatively study how the force-directed model performs in constraint-based overlap removal. One lesson we have learned is that focus + context methods inevitably need to make a trade-off between details and context. When too many foci are selected simultaneously, the context may have to be sacrificed. Besides, since words of varying sizes are not perfectly aligned, local adjustment based on forces may not produce an optimal packing, compared with space-filling layouts such as Wordle 7 or ManiWordle. 8 The proposed SOS algorithm, which utilizes the display space well with decent word readability, could be particularly useful in small displays of mobile phones and pads, where the display space is obviously more precious compared with large displays. In the future, we plan to perform a formal user study to further evaluate the quality of focus + context display techniques for word clouds. We would also like to extend this work to handle more complex word cloud applications, such as dynamic word cloud navigation and hierarchical word cloud exploration.
Footnotes
Acknowledgements
The authors wish to thank the anonymous reviewers for their comments. The NBA dataset used in this article is courtesy of HCIL (Treemap 4.1).
Funding
This work was supported in part by NSF grant IIS-1017635 and IIS-1065025, US Department of Energy grant DOESC0005036, Battelle Contract No. 137365, and Department of Energy SciDAC grant DE-FC02-06ER25779; program manager Lucy Nowell.
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
