Abstract 1 Introduction 2 Preliminaries 3 Our Metaphorical Map Generation Algorithm 4 Experimental Evaluation 5 Conclusion References

An Algorithm for Accurate and Simple-Looking Metaphorical Maps

Eleni Katsanou ORCID National Technical University of Athens, Greece Tamara Mchedlidze ORCID Utrecht University, The Netherlands Antonios Symvonis ORCID National Technical University of Athens, Greece Thanos Tolias ORCID National Technical University of Athens, Greece
Abstract

Metaphorical maps or contact representations are visual representations of vertex-weighted graphs that rely on the geographic map metaphor. The vertices are represented by countries, the weights by the areas of the countries, and the edges by contacts/boundaries among them. The accuracy with which the weights are mapped to areas and the simplicity of the polygons representing the countries are the two classical optimization goals for metaphorical maps. Mchedlidze & Schnorr [17] presented a force-based algorithm that creates metaphorical maps that balance between these two optimization goals. Their maps look visually simple, but the accuracy of the maps is far from optimal – the countries’ areas can vary up to 30% compared to required. In this paper, we provide a multi-fold extension of the algorithm in [17]. More specifically:

  1. 1.

    Towards improving accuracy: We introduce the notion of region stiffness and suggest a technique for varying the stiffness based on the current pressure of map regions.

  2. 2.

    Towards maintaining simplicity: We introduce a weight coefficient to the pressure force exerted on each polygon point based on whether the corresponding point appears along a narrow passage.

  3. 3.

    Towards generality: We cover, in contrast to [17], non-triangulated graphs. This is done by either generating points where more than three regions meet or by introducing holes in the metaphorical map.

We perform an extended experimental evaluation that, among other results, reveals that our algorithm is able to construct metaphorical maps with nearly perfect area accuracy with a little sacrifice in their simplicity.

Keywords and phrases:
Metaphorical maps, contact representation, accuracy (cartographic error), simplicity (polygon complexity), force directed algorithm
Copyright and License:
[Uncaptioned image] © Eleni Katsanou, Tamara Mchedlidze, Antonios Symvonis, and Thanos Tolias; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Graph algorithms
; Mathematics of computing Graph theory ; Theory of computation Graph algorithms analysis
Related Version:
E. Katsanou, T. Mchedlidze, A. Symvonis, T. Tolias, “An algorithm for accurate and simple-looking metaphorical maps”: https://arxiv.org/abs/2508.19810 [15]
Editors:
Vida Dujmović and Fabrizio Montecchiani

1 Introduction

Metaphorical maps or map-like graph visualization is an alternative way to the popular node-link diagrams [23] and matrix representations [27] for representing graphs. In these visualizations vertices are represented by polygonal regions and edges by contacts among them; see Fig.˜1. Metaphorical maps have their individual advantage: they rely on the human familiarity with geographic maps and therefore instantly spark curiosity in the viewers by looking fairly familiar. It has been experimentally confirmed that map-like visualizations of graphs are more enjoyable than node-link diagrams [20]. They also outperform treemaps in the tasks that require recognition of hierarchy [6]. Another important advantage of these visualizations is that they can naturally display the weights associated with the graph’s vertices, by the mean of resizing the map’s regions. Such visualizations are also known as area-proportional contact representations [1] and are closely related to cartograms [25, 18], visualizations created by deforming geographic maps with a goal to represent values of a variable (e.g. population, number of votes) by the sizes of the deformed countries. Hogräfer, Heitzler, and Schulz [13] presented a unifying framework, showing that map-like representations of graphs and cartograms lie on two opposite sides of a single spectrum of map-like visual representations.

Refer to caption
Refer to caption
Figure 1: An internally triangulated plane graph with vertex weights and its corresponding metaphorical map.

Map-like visual representations have been studied for more than 50 years [25] and a few excellent surveys have been devoted to this topic [13, 18, 25]. Generally, the construction of map-like representations is guided by the following criteria. Statistical accuracy refers to how well the modified areas represent the corresponding statistic shown; with the cartographic error measuring by how much the actual area of a region is away from the desired. Geographical accuracy refers to how much the modified shapes and locations of the regions resemble those in the original map. Preserving geographical accuracy is a goal in many algorithms generating cartograms. However, for metaphorical maps, the geographical accuracy is not relevant as there is no given geography to preserve. Finally, topological accuracy refers to how well the topology of the cartogram matches the topology of the original map. In case of map-like representations of planar graphs topological accuracy must be fully preserved – all edges of the given planar graph must be represented as regions’ contacts and each region contact must correspond to an edge.

A criterion that is less explicitly mentioned in the map-like representation literature is the complexity of the outlines of map’s regions. In general, keeping the region outlines simple is desired, since one of the tasks the users of these visualizations face, is the comparison of the region areas. The user performance in this task differs even when circles are compared to rectangles [10]. Motivated by this, a few works concentrated on generating map-like representations with simple regions. For instance, the Dorling cartogams [12] use circles as regions, and Demers cartograms [7] use square regions. Also, mosaic cartograms [9] tend to have simpler looking outlines of regions, since they are constituted by segments having a limited amount of slopes. Contrary to that, the approaches where no care is taken of the complexity of the regions, tend to produce regions with very complex outlines, refer to [18].

In theory research, the complexity of regions was formalized as the maximum number of sides per region. A series of works was devoted to reducing this metric for rectilinear area-proportional contact representation from the initial 40 [11] to the final 8 [2]. Other relevant series of work on area-universal planar drawings, starts with a planar drawing and an assignment of weights to its faces. The requirement is to modify the drawing, by preserving its planar embedding and realize the desired face areas. Thomassen [24] showed that every plane cubic graph is area-universal (perfect cartographic accuracy is achievable) and additionally in the resulting map the faces are bounded by triangles. Kleist [16] showed that 1-subdivision of any plane graph is area-universal. However, all the theoretical approaches that guarantee a few sides per region and perfect cartographic accuracy [2, 16, 24] are not guaranteed from having very narrow pointed areas in the regions and therefore the diagrams do not really look simple; refer for instance to Fig.˜12.(b,f) .

Motivated by this challenge, Mchedlidze and Schnorr [17] used a more sophisticated complexity measure introduced in [8] to evaluate the quality of the polygons in their metaphorical maps, that is able to capture the intuitive perception of a polygon’s complexity. They presented a force-based algorithm that creates metaphorical maps that balance between the two optimization goals: cartographic error and polygon complexity. Their maps look visually simple, but the cartographic error can be up to 30%.

Our contribution.

The known techniques either build complex metaphorical maps with perfect cartographic accuracy [2, 16, 24] or simple-looking metaphorical maps with cartographic error up to 30% [17]. In this work, we address this gap and aim towards producing simple metaphorical maps with near zero cartographical error.

  • We present a multi-fold extension of the algorithm in [17]. More specifically:

    • Towards improving accuracy: We introduce the notion of region stiffness and suggest a technique for varying the stiffness based on the current pressure of map regions.

    • Towards maintaining simplicity: We introduce a weight coefficient to the pressure force exerted on each polygon point based on whether the corresponding point appears along a narrow passage.

    • Towards generality: We cover, in contrast to [17], non-triangulated graphs. This is done by either generating points where more than three regions meet or by introducing holes in the metaphorical map.

  • We perform an extended experimental evaluation which aims to:

    • Compare our algorithm to the algorithm of Mchedlidze and Schnorr [17] with respect to cartographic accuracy and complexity.

    • Examine the cartographic accuracy vs the regions’ complexity trade-off.

    • Evaluate the extension to non-triangulated graphs.

    • Evaluate the influence of the initial layouts on the quality of the maps, by comparing the initial layout as suggested in [17] to the cartographically accurate initial layout given by the theoretical approach in [3].

  • Our experiments among other facts indicate that the suggested algorithm achieves almost perfect cartographic accuracy with only a small increase in polygon complexity compared to [17].

Paper organization.

In Section 2, we present our notation, the quality metrics employed in evaluating cartographic maps as well as the basic ingredients of the algorithm of Mchedlidze and Schnorr [17]. In Section 3, we present our algorithm which (a) introduces the notion of region stiffness, (b) applies corrective weight coefficients on pressure forces, and (c) handles non-triangulated plane graphs. Our experimental evaluation is presented in Section 4. Finally, we conclude in Section 5 with directions for future work.

A demo application for generating metaphorical maps has been implemented in JavaScript using yFiles [28] and is available as a web application at http://aarg.math.ntua.gr/demos/metaphoric_maps/. All experiments were executed using a Java implementation. To allow replicability, we make the implementation and the whole graph benchmark publicly available at https://github.com/ekatsanou/metaphorical-maps.

2 Preliminaries

In this section, we introduce the notation used throughout the paper and we present the quality metrics of cartographic accuracy and polygon complexity that are employed in our experimental evaluation. Given that the algorithm presented in this paper is an extension of the algorithm of Mchedlidze and Schnorr [17] (shortly MS-algorithm), we also present its brief description.

Let G=(V,E,w) be a vertex-weighted graph where w:V+ is its weight function. In a metaphorical map M=μ(G) of G, vertex vV is depicted as polygonal region (country) μ(v) so that adjacent vertices share a non-trivial contact (boundary). Our optimization goal is to build metaphorical maps such that the area of the region μ(v), denoted by A(μ(v)), is roughly equal to w(v).

In a metaphorical map M(G), we refer to the points that define its polygonal regions also as vertices. Given two vertices u,v of the metaphorical map, we denote by 𝐮𝐯 the vector from u to v.

2.1 Quality measures for Metaphorical Maps

As mentioned in the introduction, we measure the quality of a metaphorical map by its cartographic accuracy – for this, similarly to the previous work, e.g. [2, 4, 17], we employ the metric normalized cartographic error. The simplicity of the map is measured by the metric polygon complexity, introduced in [8] and applied for the evaluation of metaphorical maps in [17].

Normalized cartographic error.

Consider a vertex vV of a vertex-weighted graph G=(V,E,w) and its corresponding region μ(v) in its metaphorical map μ(G). The normalized area of region μ(v), denoted by A(μ(v)), is defined as:

A(μ(v))A(μ(v))uVw(u)uVA(μ(u))

Then, the normalized cartographic error Enc of region μ(v) is defined as:

Enc(μ(v))A(μ(v))w(v)max{A(μ(v)),w(v)} (1)

Polygon Complexity.

Brinkhoff, Kriegel, Schneider, and Braun [8] defined the complexity of a polygon P as a function of three quantities (see also [15] for details), that can be intuitively understood based on an example of a star-shape: (a) the frequency of P’s vibration, denoted by freq(P), which specifies how many tips a star-shape has, (b) the amplitude of P’s vibration, denoted by ampl(P), which specifies how long the tips of a star-shape are and (c) P’s convexity, denoted by conv(P), the fraction of the area that is not covered within the smallest enclosing circle. The polygon complexity is then defined as compl(P)=0.8ampl(P)freq(P)+0.2conv(P), which maps P to values in [0,1], with low values meaning low complexity.

In our experiments, we quantify the quality of a map by both the average and the maximum value of normalized cartographic error and polygon complexity over the regions of the map.

2.2 The MS-algorithm

The MS-algorithm [17] is a typical force-directed algorithm that employs several antagonistic forces applied to the vertices of the metaphorical map, that, hopefully, at equilibrium produce a layout with good characteristics, i.e., low normalized cartographic error and low polygon complexity. The algorithm employs three forces (vertex-vertex repulsion, vertex-edge repulsion, and angular-resolution) targeted towards producing metaphorical maps of low polygon complexity and one force (air-pressure) which works towards reducing the cartographic error of the metaphorical map. Here, we only describe the air-pressure force, since our proposed algorithm modifies how this force is applied. The exact definition of the other forces can be found in [15] and in [17].

The normalized air pressure in region g, P(g), exerts a force on each bounding edge e based on the pressure’s magnitude and the edge’s length (e) in relation to the length of the entire polygonal region boundary circ(g); see [15]for a formal definition of P(g). Thus, the air-pressure force on edge e of region g was defined as 𝐅(e,g)=3P(g)(e)circ(g)𝐫^, where 𝐫^ is a unit vector perpendicular to e directed towards outside of g. Force 𝐅(e,g) was applied to both endpoints of edge e.

The force-directed algorithm is run for iter number of steps, the value of this parameter is determined experimentally. Notice that the resultant of the forces applied to a vertex of the map, may force it to cross over an edge, and thus, the displacement of each vertex must be limited to prevent this from happening. To achieve that, the MS-algorithm adopted the rules of ImPrEd [22] that ensure the preservation of the planar embedding of the map. It should be also noted that the constant factors employed in each of the described forces have been determined experimentally.

A final note regarding the number of vertices defining each polygonal region. This number fluctuates during the execution of the algorithm in order to allow each region to obtain a more elaborate (or simpler) shape. Let ¯ denote the average edge length over all edges in the metaphorical map. Provided that no edge crossings are introduced, the MS-algorithm eliminates vertices of degree 2 that become closer than 110¯ to their neighbor and it splits in half the edges that get longer than 2¯.

Each force-directed algorithm requires for its execution an initial layout. Given a plane vertex-weighted graph G, the MS-algorithm constructs an initial metaphorical map by considering the dual of a planar drawing of G. The algorithm is designed for internally triangulated graphs. The dual vertices of the inner faces are placed in the barycenters of the triangles representing those faces. The dual edges are drawn as polylines consisting of two segments meeting at a bend-point, which lies in the middle of the corresponding primal edge. Details can be found in [17] and in [15].

3 Our Metaphorical Map Generation Algorithm

In this section, we describe our extension of the MS-algorithm. More specifically, we describe how to revise the air-pressure force utilized in the MS-algorithm by (a) incorporating a stiffness coefficient and (b) by applying a corrective weight coefficient that aims to eliminate narrow passages in the metaphorical map. The constants involved in the calculations of our algorithm are determined experimentally. Finally, we show how the algorithm is adapted in order to accommodate non-triangulated graphs.

The Stiffness of each Map Region.

After examining the output of the MS-algorithm, we observed that some regions had noticeably higher cartographic error than others, leading to the conclusion that some attributes of a region made it less responding to air pressure and, thus, resulted in high cartographic errors. Therefore, for every region we introduce a variable, which we refer to it as stiffness coefficient, that accounts for its stiffness. Let g be an internal region and let Pi(g) be its pressure at the i-th iteration of the force-directed algorithm. If at iteration i region g is over-pressured (i.e., Pi(g)>1) we increase the region’s stiffness coefficient by a small amount step; if it is under-pressured (i.e., Pi(g)<1) we decrease it by step, otherwise, it remains unchanged. In addition, we restrict the stiffness coefficient in the range [slow,shigh] where shigh1 and slow=1shigh. An appropriate value for shigh is determined experimentally.

Given a region g, we define the stiffness coefficient of g at the i-th iteration of the algorithm, denoted by si(g), as:

{s0(g)=1si(g)=min(shigh,max(slow,si1(g)+αstep)),i>0

where α={1,Pi1(g)<10,Pi1(g)=11,Pi1(g)>1

Then, the revised air-pressure force of region g on its boundary edge e during the i-th iteration of the algorithm, i1, denoted by 𝐅𝐢(e,g) is defined as

𝐅𝐢(e,g)=si(g)𝐅𝐢(e,g) (2)

where 𝐅𝐢(e,g) is the air-pressure force computed at the i-th iteration of the MS-algorithm. Note that the “stiffness” attribute is different for each region and demonstrates an adaptive behaviour over time. Employing such adaptive coefficients in force/energy-directed drawing algorithms appears to be uncommon, mainly due to performance issues. However, we note that a similar scheme has been employed in the work of Hu [14] (referred to as adaptive cooling scheme).

We performed a few experiments (see [15] for details) with 20-node graphs in order to determine the parameters of the algorithm, that resulted in the following values: step=0.02, iter=1.000 and shigh=8. To also account for the size of the input graph, assuming that larger graphs take a longer time to converge to a good metaphorical map, we decided to set the number of iterations to iter=800+10n, the value consistent with iter=1.000 for n=20.

Improving the Visual Complexity.

When we applied the stiffness coefficients to the regions, we observed that they tended to create long, narrow passages, thereby reducing the visual complexity of the metaphorical map. To mitigate this effect, we introduce a new corrective weight coefficient for the pressure forces exerted on each region’s vertices, while keeping the total pressure of the region constant. These weight coefficients redistribute pressure so that vertices in narrow passages receive a larger share of the force, whereas vertices in wider parts of the region receive less. Before defining the weight coefficient, we introduce some auxiliary notation:

  • Let M be a metaphorical map, and let ρ(M)=(gMA(g))/π denote the radius of a circle whose area equals the total area of M. We refer to ρ(M) as the ideal radius of M.

  • Let g be a region of M, let u be one of its vertices and let e be an edge of g that is not adjacent to u. Further, let x be the point of e that is closest to u. The Euclidean distance of u to e, denoted by dE(u,e), is simply the Euclidean distance from u to point x. We also define the polygonal distance of vertex u to edge e, denoted by dP(u,e), as the length of the shortest path when moving from u to x on the boundary of g.


Intuitively, an edge e is sufficiently “opposite” to a vertex u if it is close to it and, at the same time, it belongs to the opposite side of a narrow passage. For each vertex u of region g, we want to identify the edge e of g that is the closest out of those opposite to it. In order to avoid selecting edges that are collinear with u, we consider only edges for which it holds that dE(u,e)<0.9dP(u,e) and, out of those, we select the edge e of smallest Euclidean distance to u. We refer to this edge e as the pairing edge of u and we denote it by pair(u). Further, we denote the Euclidean distance from u to pair(u) by d(u,g).

Consider the metaphorical map M. We introduce a scale factor based on the ideal radius ρ(M). We regard 0.05ρ(M) as the minimum “acceptable” passage width and, hence, we define the quantity δ(u,g)=0.05ρ(M)d(u,g) which assumes values greater than 1 when u is very close to its pairing edge pair(u).

We now define the corrective coefficient β(u,g) that will be applied to the air-pressure forces at each vertex u of region g of the metaphorical map as:

β(u,g)=1+sign(δ(u,g)1)ln(1+|δ(u,g)1|).

Hence:

  • If δ(u,g)=1, i.e., u marginally does not participate in a narrow passage, then β(u,g)=1.

  • If δ(u,g)>1, then β(u,g)=1+ln(δ(u,g)), which grows logarithmically once δ(u,g) exceeds 1.

  • If 0<δ(u,g)<1, then β(u,g)=1ln(2δ(u,g)), which remains below 1 but varies smoothly as δ(u,g) decreases.

Let ui and ui+1 be the endpoints of edge ei of region g and let 𝐫^ be a unit vector perpendicular to ei directed towards the exterior of g. Recall that, the air-pressure force on ei is defined as 𝐅(ei,g)=3P(g)s(g)(ei)circ(g)𝐫^, where s(g) is the stiffness coefficient in the current iteration. Since the air-pressure force is exerted on both endpoints of ei, the total air-pressure force on ei is 2×3P(g)s(g)(ei)circ(g)𝐫^ and the total air-pressure force of region g is 2×3P(g)s(g).

The new air-pressure force, employing the above introduced corrective coefficient β(,g), on edge ei=(ui,ui+1) is now defined as 𝐅(ei,g)=

3P(g)s(g)2β(ui,g)(ei)j(ej)(β(uj,g)+β(uj+1,g))𝐫^Force applied on ui+3P(g)s(g)2β(ui+1,g)(ei)j(ej)(β(uj,g)+β(uj+1,g))𝐫^Force applied exerted on ui+1.

Therefore, the total air-pressure force applied to region g equals to i𝐅(ei,g). So, we have that:

i𝐅(ei,g)=6P(g)s(g)j(ej)(β(uj,g)+β(uj+1,g))i(β(ui,g)(ei)+β(ui+1,g)(ei))

=2×3P(g)s(g), and thus, the total air-pressure force on region g remains unchanged.

3.1 Dealing with non-Triangulated Graphs

In this section, we discuss how to create metaphorical maps for biconnected, non-triangulated plane graphs. Mchedlidze and Shnorr [17] focused on the case of internally triangulated graphs. However, their algorithm was, in principle, able to also deal with non-triangulated graphs provided that, in the initial layout of the given graph, the barycenter visibility property is satisfied, that is, the barycenter of each non-triangulated face is located within that face and all vertices of the face are visible from the barycenter, that is, the open segment that connects the barycenter and any vertex of the face does not cross the boundary of the face.

We proceed to establish the barycenter visibility property as follows. We internally triangulate the graph by creating a new auxiliary vertex for each non-triangulated inner face and connecting it to every vertex of the face. The use of auxiliary vertices for mesh generation, often called Steiner points, is a common technique to transform general grids into high-quality triangulations (see [5, 19]). Let G=(VVaux,EEaux) be the resulting internally triangulated graph where Vaux and Eaux are the sets of auxiliary vertices and the extra edges used in the triangulation, respectively. We apply on G Tutte’s barycentric embedding algorithm [26] that fixes the outerface on a circle and places every inner vertex on the barycenter of its neighbors, resulting in a planar straight line layout Γbar(G); refer to Fig.˜2.(a-b) We finish by removing the auxiliary vertices and their adjacent edges from Γbar(G); refer to Fig.˜2.(c). It is trivial to see that the derived layout satisfies the barycenter visibility property. Indeed, the auxiliary vertex of each non-triangulated face f is placed at the barycenter of its neighbors, that is, the vertices of f. Therefore, in the constructed planar drawing, face f has its barycenter lying inside it. Moreover, the fact that the auxiliary edges inside f do not cross the boundary of f, ensures the visibility between the barycenter of f and all of f’s vertices.

Refer to caption
(a)
Refer to caption
(b)
Refer to caption
(c)
Refer to caption
(d)
Refer to caption
(e)
Refer to caption
(f)
Refer to caption
(g)
Figure 2: Construction of the initial layout for non-triangulated graphs. (a) A graph G with a large non-triangulated face. (b) The auxiliary graph G – red vertices are added, drawn with the Tutte’s algorithm. (c) The auxiliary vertices are removed. (d) Transformation of the drawing in Fig.˜2.(c) based on the graph’s dual (as employed in the MS-algorithm). (e) Transformation of the drawing in Fig.˜2.(c) based on the graph’s dual and by treating the auxiliary vertices as holes. (f-g) Forces are applied to Fig.˜2.(d) and Fig.˜2.(e), respectively; holes are weighted according to the proposed function.

After ensuring that the barycenter of every inner face lies within its boundary, we are in a position to obtain an initial metaphorical map by using the transformation deployed in the MS-algorithm; refer to Section 2.2 and Fig.˜2.(d). Note that this transformation leads to points in the metaphorical maps where more than three regions meet. Recall that in our definition of the metaphorical map, only the non-degenerate contacts represent adjacencies, therefore the maps constructed this way still represent exactly the adjacencies present in the given graph.

Metaphorical maps with holes.

By visually inspecting the maps created with the above method, we noticed that the large faces (in the initial graph) which result in multiple point contacts (in the map) appear to be quite cluttered; refer to Fig.˜2.(d) and Fig.˜3.(a). Therefore, we propose an alternative method that treats large faces as holes; Refer to Fig.˜2.(e). Practically, obtaining such maps is very simple – we can just consider the graph G obtained after the introduction of the auxiliary vertices, transform it to a map, as suggested in the MS-algorithm , and treat regions corresponding to the auxiliary vertices as holes. When applying forces to the map vertices, we can treat holes in exactly the same way we treat other regions. However, since the holes do not have a target weight, we have the flexibility to assign those weights with the goal to improve the appearance of the overall map. Our intuition is that the more regions are adjacent to a hole, and the heavier those regions are, the bigger the hole needs to be. After some experimentation, we found that the following function for assigning weights to holes produces reasonably good results, however, with further testing better functions may arise:

holeWeight(hi)=14deg(hi)[(vj,hi)E(G)jw(vj)]2 (3)

Note that, we do not prioritize minimizing the normalized cartographic error within holes, as they do not represent regions. However, it is important that holes remain visually simple to preserve the clarity of adjacencies. To allow adjacent regions the flexibility to expand naturally, we do not apply stiffness coefficients to holes. Nonetheless, we do apply the corrective weight coefficients of the pressure forces to maintain overall layout stability.

Refer to caption
(a) Map with high degree contact points.
Refer to caption
(b) Map with holes.
Figure 3: Two maps which correspond to the same 40-vertex graph. Non-triangulated regions are represented in (a) with high degree contact points and in (b) with holes.

4 Experimental Evaluation

In our experimental evaluation we aim to answer the following research questions:

  1. 1.

    What is the performance of our algorithm compared to the performance of the MS-algorithm based on the quality metrics of normalized cartographic error and polygon complexity? Does the difference in performance depend on the input characteristics such as number of vertices, nesting ratio or weight ratio (refer to Section 4 for the definitions)?

  2. 2.

    Is there a trade-off between cartographic error and polygon complexity? How do we control it?

  3. 3.

    Does the initial metaphorical map have an effect on the quality of the final one?

  4. 4.

    Is the handling of non-triangulated biconnected graphs satisfactory?

  5. 5.

    Is the proposed algorithm practical? Does its running time scale well with the size of the input graph?

The analysis of question 5 can be found in [15].

The Graph Test Data.

For the generation of test data, we followed the approach of [17] (described in detail in Algorithm 5.1 of [21] with a uniform distribution). The authors of [17] generate planar straight-line drawings based on the Delaunay triangulation of a random point set. A fraction nest[0,1] of the points, called nesting ratio, is placed within the triangles of the initial Delaunay triangulation. It was experimentally verified in [17] that the nesting ratio has an effect on the algorithm’s performance, therefore, we also included it in our analysis. For every vertex, we generate a weight using a uniform distribution with different weight ratios of maximum to minimum weight. The above described procedure is augmented to generate non-triangulated plane graphs as follows. Following the generation of an internally triangulated plane graph, we remove a number of randomly selected internal edges in order to create non-triangulated plane graphs. We denote the ratio of removed to initial internal edges by rem. Note that an edge is only removed if the graph remains biconnected.

Comparison to the MS-algorithm.

For the comparison of the performance of our algorithm (NEW-algorithm) against MS-algorithm, we examined how three parameters – the nesting ratio nest (see Fig.˜4), the weight ratio w (see Fig.˜5), and the total number of nodes n (see Fig.˜6)–influence both algorithms. To this end, we conducted three experiments:

  1. 1.

    Varying nesting ratio. For each value of nest{0,0.1,0.2,,1.0}, we generated 50 graphs with n=20 nodes and weight ratio w=5.

  2. 2.

    Varying weight ratio. For each w{5,10,15,20}, we generated 50 graphs with n=20 nodes and nesting ratio nest=0.

  3. 3.

    Varying number of nodes. For each n{15,20,25,,80}, we generated 50 graphs with nesting ratio nest=0 and weight ratio w=5 and we let the algorithms run for 800+10n iterations.

Figure 4: NEW-algorithm vs MS-algorithm for different values of nesting ratio.
Figure 5: NEW-algorithm vs MS-algorithm for different values of weight ratio.
Figure 6: NEW-algorithm vs MS-algorithm for different number of nodes.

The results of every comparison follow a similar trend. Our algorithm achieves average cartographic error close to zero at the cost of a slightly higher polygon complexity. In all of our experiments (1450 in total), the recorded average normalized cartographic error (for each metaphorical map created) was in the range [0.12%,0.44%]. In comparison, the same metric for MS-algorithm is in the range [8.8%,24.7%]. The price we paid was a small increase in the average polygon complexity. The highest observed increase in average polygon complexity over all the maps was 6.9% and was observed for n=75, where the maximum value of average polygon complexity was 19.6%, well below the 40% value where polygons are considered to be complex [8]. The maps in our experiment that correspond to this maximum value of increase in the average polygon complexity are shown in Fig.˜7.(a-b). We observe that indeed our map’s regions are longer and, sometimes, narrower. However, in the case of smaller (or “simpler”) graphs, this increase in complexity is hardly noticeable, see e.g. Fig.˜7.(c-d). Regarding the properties of the graphs, all three parameters (nesting ratio, weight ratio, and the number of vertices) affect the polygon complexity of our produced maps.

Refer to caption
(a) NEW-algorithm
Refer to caption
(b) MS-algorithm
Refer to caption
(c) NEW-algorithm
Refer to caption
(d) MS-algorithm
Figure 7: (a-b) The maps that correspond to the largest increase in average polygon complexity. The corresponding graph has 75 vertices. (c-d) Maps for a random graph.

Cartographic error and polygon complexity trade-off.

The cost we pay for achieving average cartographic error close to zero is a small increase in the average polygon complexity. Given that our algorithm is identical to the MS-algorithm for stiffness shigh=1 (without the application of the corrective weight coefficients on the pressure forces), we evaluated our algorithm for several values of shigh{2,4,8} (see Fig.˜8). We observed that while the average and maximum normalized cartographic error remain nearly identical for shigh=4 and shigh=8, the algorithm performs better at shigh=8 in terms of both average and maximum polygon complexity. Based on these observations, we set shigh=8 in our algorithm. This value achieves very small cartographic error while maintaining acceptable polygon complexity. Moreover, increasing shigh beyond 8 does not lead to meaningful improvements in either evaluation metric.

Fig.˜9 shows a “heat-map” style coloring of the regions of metaphorical maps of the same graph for MS-algorithm (Fig.˜9.(a)) and our algorithm for shigh{2,8} (Fig.˜9.(b)-(c)), demonstrating the effect of the introduction of the stiffness coefficient. These experiments reveal a monotonic decrease in the maximum/average cartographic error and a monotonic increase in maximum/average polygon complexity based on the value of shigh.

Figure 8: Cartographic Error and Polygon Complexity for different values of maximum stiffness, n=20, w=5, nest=0.
Refer to caption
(a) MS-algorithm
Refer to caption
(b) shigh=2
Refer to caption
(c) shigh=8
Refer to caption
Figure 9: Metaphorical maps for the same graph for MS-algorithm and NEW-algorithm for different values of max stiffness shigh.

Non-Triangulated Graphs.

We tested our algorithm for graphs with ratio of removed edges rem{0,0.2,0.4,0.6} (Fig.˜10 and 11). For each value of 𝑟𝑒𝑚, we conducted experiments on fifty graphs, each with forty nodes, a nesting ratio of zero, and a weight ratio of five. We let the algorithm run for 1200 iterations. Recall that hole region weights were assigned according to Equation 3. Normalized cartographic error and polygon complexity were measured only for non-hole regions.

We observed that increasing the parameter rem (i.e., the fraction of removed edges) led to a slight increase across all four evaluation metrics (Fig.˜10). This can be explained by the fact that the increasing number of missing edges creates more complex patterns of adjacency, i.e. holes behave as nodes of high degree.

We also observed that holes can have narrow passages; refer to Fig.˜11.(c)-(d), which possibly can also be explained by the relatively high number of regions adjacent to a hole. We anticipate that this effect can be mitigated by using a different hole weight function and by re-engineering the applied forces.

Figure 10: Cartographic Error and Polygon Complexity for different values of the ratio rem of removed edges and by adopting function holeWeight() for assigning weights to the polygonal holes. Here, n=40, w=5, nest=0.
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 11: Example for the values of rem{0,0.2,0.4,0.6}.

The effect of the initial drawing.

Given that we managed to, effectively, get the average cartographic error down to zero, we did not study the effect of the initial metaphorical map used by our algorithm on the cartographic error. Instead, we focused on the polygon complexity and we examined the effect of having an initial map with good average cartographic error. As such good initial maps we considered the maps produced by the algorithm in [3] (referred to as octagonal map) which produces rectangular maps with at most 8 corners and of average cartographic error close to zero. We observed that, when using octagonal maps as initial layout, no consistent improvement was observed while the produced maps appeared to have long and skinny regions. Moreover, when the number of vertices becomes larger the metaphorical maps become harder to read due to their long, skinny, and circular shaped regions. See Fig.˜12.(a-d) and Fig.˜12.(e-h) for sample metaphorical maps of 20 and 40 regions, respectively. Finally, it is noted that our algorithm also required a larger number of iterations (about double) when initialized with such maps in order to converge to its final metaphorical map solution.

Refer to caption
(a) Initial Graph (n=20).
Refer to caption
(b) Octagonal map.
Refer to caption
(c) Output based on graph’s dual.
Refer to caption
(d) Output based on octagonal map.
Refer to caption
(e) Initial Graph (n=40).
Refer to caption
(f) Octagonal map.
Refer to caption
(g) Output based on graph’s dual.
Refer to caption
(h) Output based on octagonal map.
Figure 12: Metaphorical maps produced by our algorithm when the initial map is based on the graph’s dual transformation and on an octagonal map. (a)-(d): 20 vertex graph. (e)-(h): 40 vertex graph.

5 Conclusion

In this work we have proposed an improvement of MS-algorithm [17] that produces metaphorical maps of vertex-weighted graphs and presented a detailed experimental evaluation of the newly proposed algorithm. Our goal was to close the gap between the metaphorical maps with perfect cartographic accuracy [2, 16, 24] that despite using a few corners per polygonal region can look quite complex and the simple-looking metaphorical maps produced by MS-algorithm with cartographic error up to 30%. Our experiments showed that we can achieve cartographic error close to zero, by paying a small price for the polygon complexity. Our algorithm achieves this improvement by using the notion of region stiffness that adapts as the force-directed simulation runs. We have seen that the maximum value of this stiffness determines the interplay between the cartographic error and polygon complexity.

To quantify the complexity of the maps, we applied the quality metric introduced in [8], who presented examples of geographic maps showing that this metric corresponds to the human intuition of map complexity. Our experiments with metaphorical maps do not contradict this intuition. However, we believe that whether this function is indeed appropriate for qualifying the human intuition of the metaphorical maps complexity has to be investigated in a user study.

We conjecture that the performance of the algorithm for non-triangulated graphs can be further improved by considering different hole weight functions and by engineering the forces to avoid narrow passages. Finally, it is also interesting to compare the quality of the maps for non-triangulated graphs with and without holes. We defer these investigations to the extended version of this work.

References

  • [1] Muhammad Jawaherul Alam. Contact representations of graphs in 2D and 3D. Doctoral thesis, The University of Arizona, 2015. URL: https://www.proquest.com/openview/5bf2b2dc7f21bf9f8759bdc89632b50b/1?pq-origsite=gscholar&cbl=18750.
  • [2] Muhammad Jawaherul Alam, Therese Biedl, Stefan Felsner, Andreas Gerasch, Michael Kaufmann, and Stephen G. Kobourov. Linear-time algorithms for hole-free rectilinear proportional contact graph representations. Algorithmica, 67(1):3–22, 2013. doi:10.1007/S00453-013-9764-5.
  • [3] Muhammad Jawaherul Alam, Therese Biedl, Stefan Felsner, Michael Kaufmann, Stephen G. Kobourov, and Torsten Ueckerdt. Computing cartograms with optimal complexity. Discrete & Computational Geometry, 50(3):784–810, 2013. doi:10.1007/s00454-013-9521-1.
  • [4] Muhammad Jawaherul Alam, Stephen G. Kobourov, and Sankar Veeramoni. Quantitative measures for cartogram generation techniques. Comput. Graph. Forum, 34(3):351–360, 2015. doi:10.1111/cgf.12647.
  • [5] Marshall Bern and David Eppstein. Mesh Generation and Optimal Triangulation, pages 47–123. World Scientific Publishing Co Pte Ltd, 1995. doi:10.1142/9789812831699_0003.
  • [6] Robert P. Biuk-Aghai, Patrick Cheong-Iao Pang, and Bin Pang. Map-like visualisations vs. treemaps: an experimental comparison. In Robert P. Biuk-Aghai, Jie Li, and Shigeo Takahashi, editors, Proceedings of the 10th International Symposium on Visual Information Communication and Interaction, VINCI 2017, Bangkok, Thailand, August 14-16, 2017, pages 113–120. ACM, 2017. doi:10.1145/3105971.3105976.
  • [7] I. Bortins, S. Demers, and K. Clarke. Cartogram types, 2002.
  • [8] Thomas Brinkhoff, Hans-Peter Kriegel, Ralf Schneider, and A. Braun. Measuring the complexity of polygonal objects. In Patrick Bergougnoux, Kia Makki, and Niki Pissinou, editors, Proceedings of the 3rd ACM International Workshop on Advances in Geographic Information Systems, Baltimore, Maryland, USA, December 1-2, 1995, in conjunction with CIKM 1995, page 109. ACM, 1995.
  • [9] Rafael G. Cano, Kevin Buchin, Thom Castermans, Astrid Pieterse, Willem Sonke, and Bettina Speckmann. Mosaic drawings and cartograms. Comput. Graph. Forum, 34(3):361–370, 2015. doi:10.1111/cgf.12648.
  • [10] Prabu David. Seeing is believing: Comparative performance of the pie and the bar. Newspaper Research Journal, 17(1-2):89–104, 1996. doi:10.1177/073953299601700109.
  • [11] Mark de Berg, Elena Mumford, and Bettina Speckmann. On rectilinear duals for vertex-weighted plane graphs. Discret. Math., 309(7):1794–1812, 2009. doi:10.1016/j.disc.2007.12.087.
  • [12] Danny Dorling. Area cartograms: their use and creation. University of East Anglia: Environmental Publications, 59, 1996.
  • [13] Marius Hogräfer, Magnus Heitzler, and Hans-Jörg Schulz. The state of the art in map-like visualization. Comput. Graph. Forum, 39(3):647–674, 2020. doi:10.1111/cgf.14031.
  • [14] Yifan Hu. Efficient and high quality force-directed graph drawing. Mathematica Journal, 10:37–71, January 2005.
  • [15] Eleni Katsanou, Tamara Mchedlidze, Antonios Symvonis, and Thanos Tolias. An algorithm for accurate and simple-looking metaphorical maps. Tech. Report arXiv:2508.19810, Cornell University, 2025. doi:10.48550/arXiv.2508.19810.
  • [16] Linda Kleist. Drawing planar graphs with prescribed face areas. J. Comput. Geom., 9(1):290–311, 2018. doi:10.20382/jocg.v9i1a9.
  • [17] Tamara Mchedlidze and Christian Schnorr. Metaphoric Maps for Dynamic Vertex-weighted Graphs. In Marco Agus, Wolfgang Aigner, and Thomas Hoellt, editors, EuroVis 2022 - Short Papers. The Eurographics Association, 2022. doi:10.2312/evs.20221090.
  • [18] Sabrina Nusrat and Stephen G. Kobourov. The state of the art in cartograms. Comput. Graph. Forum, 35(3):619–642, 2016. doi:10.1111/cgf.12932.
  • [19] Steven J. Owen. A survey of unstructured mesh generation technology. In 7th International Meshing Roundtable, 1998.
  • [20] Bahador Saket, Carlos Scheidegger, and Stephen G. Kobourov. Comparing node-link and node-link-group visualizations from an enjoyment perspective. Comput. Graph. Forum, 35(3):41–50, 2016. doi:10.1111/cgf.12880.
  • [21] C. Schnorr. Visualizing dynamic clustered data using areaproportional maps. Master’s thesis, Karlsruhe Institute of Technology, 2020. URL: https://github.com/jenox/Master-Thesis.
  • [22] Paolo Simonetto, Daniel Archambault, David Auber, and Romain Bourqui. Impred: An improved force-directed algorithm that prevents nodes from crossing edges. Comput. Graph. Forum, 30(3):1071–1080, 2011. doi:10.1111/j.1467-8659.2011.01956.x.
  • [23] Roberto Tamassia, editor. Handbook on Graph Drawing and Visualization. Chapman and Hall/CRC, 2013.
  • [24] Carsten Thomassen. Plane cubic graphs with prescribed face areas. Comb. Probab. Comput., 1:371–381, 1992. doi:10.1017/S0963548300000407.
  • [25] Waldo Tobler. Thirty five years of computer cartograms. An. of the Assoc. of American Geographers, 94(1):58–73, 2004. doi:10.1111/j.1467-8306.2004.09401004.x.
  • [26] William Thomas Tutte. How to draw a graph. Proceedings of the London Mathematical Society, 3(1):743–767, 1963.
  • [27] Han-Ming Wu, ShengLi Tzeng, and Chun-houh Chen. Matrix Visualization, pages 681–708. Springer Berlin Heidelberg, Berlin, Heidelberg, 2008. doi:10.1007/978-3-540-33037-0_26.
  • [28] yWorks GmbH. yfiles for html. https://www.yworks.com/products/yfiles-for-html, 2025. Software library.