1 Introduction
When we visualize directed graphs (digraphs for short) that model hierarchical relations with nodelink diagrams, we traditionally turn edge directions into geometric directions by letting each edge point upward. Aiming for visual clarity, we would like such an upward drawing to be planar, that is, no two edges should cross [DETT99]. If this is possible, the resulting drawing is called an upward planar drawing; see Figure 1 (a). Interestingly, as Di Battista and Tamassia [DBT88] have shown, every upward planar drawing can be turned into one where each edge is drawn with a single line segment; such a straightline drawing may however require an exponentially large drawing area.
Another important class of drawings are (planar) orthogonal drawings, where edges are drawn as sequences of horizontal and vertical line segments [DETT99]; see Figure 1 (b). This drawing style is commonly used for schematic drawings such as VLSI circuit design and UML diagrams. Schematic drawings that allow more than two slopes for edge segments include hexalinear and octilinear drawings, which find application in metro maps [NW11]. In general, the use of only few geometric primitives (such as different slopes) in a graph drawing facilitates a low visual complexity; a common quality measure for drawings [Sch15].
In recent years, the interest in upward planar drawings that use only few different slopes has grown. For example, among other results, Bekos et al. [BDGD18] showed that every socalled bitonic graph with maximum degree admits an upward planar drawing where every edge has at most one bend and the edges segments use only distinct slopes. Di Giacomo et al. [DGLM20] provided complementary results by proving that also every seriesparallel digraph admits a 1bend upward planar drawing on distinct slopes; their drawings also have optimal angular resolution. Brückner et al. [BKM19] considered levelplanar drawings with a fixed slope set, that is, upward planar drawings where each vertex is drawn on a predefined integer ycoordinate (its level). In this paper, we continue this recent trend. In particular, we study bendless upward planar drawings that use only two different slopes. An example of such a drawing is shown in Figure 1 (c). Some of our results also imply results for 1bend upward planar drawings. We now define these drawing concepts more precisely and list related work.
Upward planarity.
An upward planar drawing of a directed graph is a planar drawing of where every edge is drawn as a monotonic upward curve from to . A digraph is called upward planar if it admits an upward planar drawing. Two upward planar drawings of the same digraph are topologically equivalent if the lefttoright orderings of the incoming and outgoing edges around each vertex coincide in the two drawings. An upward planar embedding is an equivalence class of upward planar drawings. An upward planar digraph is called upward plane if it is equipped with an upward planar embedding.
A necessary though not sufficient condition for upward planarity is acyclicity [BDBLM94]. Moreover, Garg and Tamassia [GT01] showed that testing upward planarity is NPcomplete for general digraphs. While the digraphs used in their reduction contain vertices with in and outdegree higher than two, such vertices can be split into mulitple vertices of maximum in and outdegree at most two without losing any of the properties required in their proofs. It is thus also NPcomplete to test upward planarity for digraphs with in and outdegree at most two. On the positive side, there exist several fixedparameter tractable algorithms for general digraphs [Cha04, HL06, DGL10] and polynomial time algorithms for single source digraphs [BDBMT98], seriesparallel digraphs [DGL10], outerplanar digraphs [Pap95], and triconnected digraphs [BDBLM94]. Moreover, upward planarity can be decided in polynomial time if the embedding is specified [BDBLM94].
bend slope drawings.
In an bend drawing of a graph each edge is drawn with at most line segments; equivalently, each edge has at most bends. An bend slope drawing of is an bend drawing of where every edge segment has one of at most distinct slopes. From now on and if not further specified, we refer to bendless (or 0bend) slope drawings simply with slope drawings.
Note that orthogonal drawings are slope drawings without a bound on the number of bends. Tamassia [Tam87] showed that a planar orthogonal drawing with minimum total number of bends of a plane graph on vertices can be computed in time. Rhaman et al. [RNN03] gave necessary and sufficient conditions for a subcubic plane graph to admit a bendless orthogonal drawing. For drawings in 3D, Eppstein [Epp13] considered bendless orthogonal graph drawings where two vertices are adjacent if and only if two of their coordinates are equal.
Given a graph , the minimum number of slopes needed for to admit a slope drawing is called the slope number of [WC94]. In the planar setting, this is the planar slope number of . Both these numbers have been studied extensively. For example, Pach and Pálvölgyi [PP06] showed that the slope number of graphs with maximum degree 5 can be arbitrarily large. Further results, include bounds on slopes numbers of graph classes such as trees, 2trees, planar 3trees, outerplanar graphs [DESW07, LLMN13, JJK13, KMW14], cubic graphs [MP12], and subcubic graphs [DGLM18, KMSS18]. Determining the planar slope number is hard in the existential theory of the reals [Hof17].
Upward planar 2slope drawings.
The focus of this paper lies on (bendless) upward planar slope drawings. We consider only the slope set and denote it by , since an upward planar 2slope drawing on any two slopes can be morphed into an upward planar 2slope drawing with the slopes and
– imagine this as (un)skewing a partial grid; see
Figure 2. Note that a natural lower bound on the upward planar slope number of a graph is given by its maximum in and outdegree. Hence, we assume that the graphs considered in this paper have maximum in and outdegree at most two.Bachmaier et al. [BBB09], Brunner and Matzeder [BM11], and Bachmaier and Matzeder [BM13] studied straightline drawings of ordered and unordered rooted trees on grids for . Some of their drawing styles are also upward planar. A classical results of Crescenzi et al. [CDP92] shows that any binary tree with vertices admits an upward planar 2slope drawing in area. Concerning more complex graphs, upward planar drawings with few slopes for lattices have been studied by Czyzowicz et al. [CPR90] and Czyzowicz [Czy91]. As mentioned above, Bekos et al. [BDGD18] and Di Giacomo et al. [DGLM20] considered such drawings for graph and seriesparallel graphs but also allowed bends. In a companion paper to the current one, Klawitter and Zink [KZ21] study upward planar slope drawings for and among other results show that it is NPhard to decide whether an outerplanar digraph admits an upward planar 3slope drawing.
Phylogenetic networks.
Our interest in upward planar 2slope drawings also stems from the problem of visualizing phylogenetic networks. Phylogenetic trees and networks are used to model the evolutionary history of a set of taxa like species, genes, or languages [HRS10, Dun14, Ste16]. The precise definition of phylogenetic networks and their drawing conventions may vary widely depending on the particular use case. For instance, vertices may have timestamps that should be represented in the drawings or leaves may be required to be placed on the same height. In combinatorial phylogenetics the following definition is commonly used [HRS10]: A phylogenetic network is a rooted digraph where the leaves are labelled bijectively with a set of taxa. Inner vertices are either tree vertices that have indegree one and outdegree two or reticulations that have indegree two and outdegree one; see Figure 3 (a). A network without reticulations is a phylogenetic tree; see Figure 3 (b).
There exist different drawing styles for phylogenetic trees such as rectangular or circular cladograms [BBS05, Hus09]. If the focus is on the topology of the tree (and thus the taxonomy), a common drawing style is upward planar with 2slope and all leaves aligned on a line. Theoretical work to adapt classical drawing styles from phylogenetic trees to phylogenetic networks has been carried out by Huson et al. [KH08, Hus09, HRS10]. A different approach has been taken by Tollis and Kakoulis [TK16], who propose a drawing style similar to treemaps for a special class of phylogenetic networks. There also exist several software tools to draw phylogenetic networks [HB05, HS12, BDM12, Vau17, SVGB21]. Here we are interested in drawing upward planar phylogenetic networks with two slopes and the additional constraint that all leaves lie on a horizontal line; see Figure 3 (c).
Contribution.
In this paper we investigate the following decision problem. Given a digraph of in and outdegree at most two, decide whether it admits an upward planar slope drawing. We distinguish the fixed and variable embedding scenario, that is, whether is already equipped with an upward planar embedding or not. In the former case, we give a simple characterisation of when a drawing exists; see Section 3. By making use of orthogonal drawing algorithms, we also show how to construct a drawing (if it exists) in linear time. In addition, if no upward planar 2slope drawing exists, we describe how to obtain an upward planar 1bend 2slope drawing of with minimum number of bends.
For the variable embedding scenario, we check whether graphs of different graph classes admit an upward planar 2slope drawing, based on the results of see Section 3. In Section 4.1, we show that for a singlesource digraph , checking whether an upward planar 2slope drawing of exists can be done based on a single upward planar embedding of . In the affirmative, a suitable upward planar embedding can be derived and a drawing constructed in linear time. For seriesparallel digraphs (Section 4.3) and general digraphs (Sections 4.5 and 4.4), we derive a quartictime and a fixedparameter tractable algorithm, respectively. These algorithms are based on Didimo et al.’s algorithms for upward planarity testing [DGL10].
Lastly, we show how to compute 2slope drawings of upward planar phylogenetic networks, where all leaves lie on a horizontal line in linear time; see Section 5. We conclude with a short discussion and open problems.
2 Preliminaries
Let be an upward plane digraph with maximum in and outdegree two. We assume, without loss of generality, that is connected and let denote the number of vertices of or the graph currently under consideration.
If a vertex of has two incoming edges, then based on the lefttoright ordering of the edges around , it is natural to talk about the left and the right incoming edge of . If an edge is the only incoming edge at , we call the sole incoming edge of . The same holds for outgoing edges; see Figure 4 (a).
A 2slope assignment is a mapping from the edges of to the slopes and , i.e. . We say is a consistent 2slope assignment if

every left (right) incoming edge of a vertex is assigned the slope (), and

every left (right) outgoing edge of a vertex is assigned the slope ().
An edge that is the sole outgoing edge of and the sole incoming edge of may have either slope. A digraph together with a consistent 2slope assignment forms an upward planar 2slope representation . To ease reading, we simply write 2slope representation.
Suppose contains an edge that is the left outgoing edge of and left incoming edge of . Let be the face to the right of ; see Figure 4 (b). We then call a bad edge with respect to , since obstructs a consistent slope assignment. The same holds with “left” and “right” in reversed roles.
Let be a slope representation of . Let be a triplet such that is a vertex of the boundary of a face and , are incident edges of that are consecutive on the boundary of in counterclockwise direction. The triplet is called an angle of . We can categorise angles into three groups, namely, is

a large angle if and span a 270 angle in ,

a small angle if and span a 90 angle in , or

a flat angle if and span a 180 angle in
with respect to the slopes assigned to and . A vertex of is called a local source with respect to a face if has two outgoing edges on the boundary of . A local sink is defined analogously. Furthermore, we call a switch with respect to if the slopes of and differ; for example, every local source is a switch. We further categorise switches by the angle they span and where they lie on the boundary of ; see Figure 4 (c). A switch is a large switch if and span a large angle at and a small switch otherwise; note that there can be no “flat” switch. We call a sourceswitch or sinkswitch if is a local sink or local source, respectively. Otherwise, if and have to the right (left), then is a leftswitch (resp. rightswitch). Note that an inner face of contains exactly four small switches more than large switches and that the outer face contains four large switches more than small switches. An inner (the outer) face is rectangular if it contains exactly four small (large) switches.
Assume for now that is biconnected. The following definitions are illustrated in Figure 5. A split pair of is either a separation pair or a pair of adjacent vertices. A split component of with respect to the split pair is either an edge (or ) or a maximal subgraph of such that contains and and is not a split pair of . Let be such a split component with respect to the split pair . If is equipped with an upward planar embedding, then we define the flip of as the change of the embedding of by reversing the edge ordering of every vertex of .
3 Fixed embedding
In this section we consider the problem of whether an upward plane digraph admits an upward planar 2slope drawing. As noted above, a bad edge obstructs the existence of a consistent 2slope assignment and thus of a 2slope representation for . We show that the absence of any bad edges is not only necessary but also sufficient.
Since upward planar 2slope drawings are related to orthogonal drawings, we can make use of techniques used to construct them. The classical algorithm by Tamassia [Tam87], which constructs an orthogonal drawing of a plane graph with minimum number of bends, works in three steps; refer also to Di Battista et al. [DETT99, Chapter 5]. It starts with a plane graph and constructs a socalled orthogonal representation, a description of the shapes of the faces. The second step, called refinement, subdivides each face into rectangles. Finally, the third step performs a socalled compaction – it assigns coordinates to the vertices with the goal to minimize the area of the drawing. The technique for construction an orthogonal representation is not suitable for the construction of an upward planar 2slope drawing, as it does not preserve the upwardness of edges. However, with a 2slope representation already given, we can adopt the refinement algorithm by Tamassia and the compaction algorithm by Di Battista et al. for our purposes. In the following lemma we sketch such a modified version of Tamassia’s algorithm that refines the faces of a 2slope representation. For this, recall that a switch is a triplet consisting of a vertex and its two incident edges along a face in counterclockwise order where and have different slopes.
Lemma 3.1.
Let be an upward plane digraph on vertices with 2slope representation . Then, in time, can be refined into a digraph that contains only rectangular faces and such that is a topological minor of respecting .
Proof.
If every face of is already rectangular, then we are done and . Assume this is not the case and let be nonrectangular inner face of . We describe how to refine into rectangular faces.
First, traverse the boundary of counterclockwise and store in each switch pointers to its preceding and subsequent switch. Next, starting at any switch, traverse the circular sequence of switches in counterclockwise order. Let be the first encountered large switch that is preceding a small switch . Note that such exists since is not rectangular but contains at least four small switches. Without loss of generality, assume is a sinkswitch. (The cases when is a source, left, or rightswitch work analogously.) Let be the subsequent switch of . If is a large switch, then add a vertex and the edges and with slopes and , respectively; see Figure 6 (a). Otherwise, if is a small switch (and thus a rightswitch), then subdivide the outgoing edge of with a new vertex , and add the edge with slope . Assign the slope to the two edges resulting from the subdivision. This ensures that is respected by as topological minor of ; see Figure 6 (b). In either of the two case, the result is a rectangular face and a face with one less small and one less large switch than . Let now take the role of and store the preceding switch of and the subsequent switch of as preceding and subsequent switches of , respectively. If is a small switch, continue the traversal with the switch preceding instead of with . Therefore, if a large switch precedes in , the process directly continues with a refinement step without having to potentially traverse the whole circular sequence first. Stop when only four switches are left and when is thus rectangular. Note that this process runs in linear time in terms of the size of and that it only adds as many new vertices as contains large switches.
Repeat this step for every nonrectangular face of including the outer face. Let be the resulting digraph, which by construction has as topological minor and a size in . Furthermore, since the boundary of every face of was traversed only twice, this refinement algorithm runs in time. ∎
We can now prove the main theorem of this section.
Theorem 3.2.
Let be an upward plane digraph with vertices. Then the following statements are equivalent.

[leftmargin=*,label=(F0)]

admits an upward planar slope drawing.

admits a slope representation .

contains no bad edge.
Moreover, there exists an time algorithm that tests if satisfies 3 and constructs an upward planar 2slope drawing of in the affirmative case.
Proof.
Note that 1 implies 2 and 2 implies 3. We first show that 3 implies 2 and then how to construct a drawing 1 from 2.
Whether contains a bad edge can easily be checked in time. Suppose it does not and thus satisfies 3. Construct a consistent 2slope assignment for as follows. Go through all edges of (in any order). For an edge , if it is a left (right) incoming edge, assign it (). Otherwise, if it is a left (right) outgoing edge, assign it (). Since is not a bad edge, there is no conflict. If is both a sole incoming and a sole outgoing edge, assign it either slope, say . Together with the already given upward planar embedding of , this slope assignment yields a 2slope representation of .
Next, we construct an upward planar 2slope drawing of . Use Lemma 3.1 to obtain a slope representation of an upward planar digraph in which every face is rectangular in time. Ignoring the slope assignment in we basically have a orthogonal representation of a graph where every face is rectangular. Therefore we can apply the lineartime compaction algorithm by Di Battista et al. [DETT99, Theorem 5.3]. This algorithm assigns edge lengths and computes coordinates while handling the vertical and orthogonal direction of a orthogonal representation independently. Hence, applying the algorithm to , the edges with slopes and are handled independently and keep their slopes. As a result, we get an upward planar 2slope drawing of , which we can reduce to a drawing of . Since the three steps run in time each, the claim on the running time follows. ∎
Suppose we have an upward plane digraph with bad edges. Since admits no upward planar 2slope drawing, it is natural to ask whether admits an upward planar 1bend 2slope drawing. In particular, if such a drawing exist, is it enough to bend only the bad edges? Using Theorem 3.2 we can answer this question affirmatively.
Corollary 3.3.
Let be an upward plane digraph with vertices, maximum in and outdegree at most two, and with bad edges.
Then admits an upward planar 1bend 2slope drawing with bends.
Moreover, without changing the embedding, this is the minimum number of bends that can be achieved.
Proof.
Subdivide every bad edge once to obtain a graph . Then apply Theorem 3.2 to obtain an upward planar 2slope drawing of . Since a bad edge of is neither a sole incoming nor a sole outgoing edge, the two edges obtained from in have different slopes. Hence, by turning every subdivision vertex into a bend we get an upward planar 1bend 2slope drawing of .
Since even a single bad edge obstructs a 2slope representation and since bending a nonbad edge clearly does not help for other bad edges either, it follows that bends are also necessary. ∎
Note that may admit an upward planar 1bend 2slope drawing with less or no bends if the embedding is changed.
4 Variable embedding
In this section we consider the problem of whether a given upward planar digraph of a particular graph class admits an upward planar slope drawing under any upward planar embedding. Before we start with the class of singlesource digraphs, we make two general observations.
Let be an upward planar digraph with maximum in and outdegree at most two. Suppose contains a leaf . Note that removing from does not change whether admits an upward planar 2slope drawing. Moreover, we may reduce to a digraph without leaves, obtain a drawing of the reduced digraph (if possible), and then add the leaves to obtain a slope drawing of . Removing or later restoring leaves takes only linear time.
While leaves are no obstructions, transitive edges are.
Observation 4.1.
A transitive edge of an upward planar digraph is a bad edge in any upward planar embedding of .
Proof.
Let be a transitive edge of . By definition, there is a directed path from to different from . Since may not cross , it enters from the same side (left or right) as it leaves in any upward planar embedding of and hence is always a bad edge. ∎
4.1 Singlesource digraphs
For a singlesource digraph , our idea is to first compute an arbitrary upward planar embedding of with the lineartime algorithm of Bertolazzi et al. [BDBMT98]. We then check whether there are any bad edges and, if so, whether they can be fixed with small changes to the embedding. For a characterisation of when such fixes are possible, we need the following lemmata.
Lemma 4.2.
An upward planar singlesource digraph contains no bad edge with respect to the outer face.
Proof.
Consider an upward planar embedding of and suppose is a bad edge with respect to the outer face . Then is a sink of that would span a small angle in a 2slope representation. This implies that there are two sources for that would span large angles, i.e. that are sources of . This is a contradiction to being a singlesource digraph. ∎
Lemma 4.3.
Let be an upward planar singlesource digraph with maximum in and outdegree at most two. Then in any upward planar embedding of , there are at most two bad edges with respect to the same face.
Proof.
Let be an upward plane singlesource digraph and let be a face of . Note that a bad edge is always incident to a sink of a face that would span a small angle in a 2slope representation. If there are three or more bad edges with respect to , then contains at least two such sinks (like and in Figure 7 (a)). There is then at least one source for that would span a large angle. However, is also a source of and since it is not the source for the outer face, it is not the only source of . This is a contradiction to being a singlesource digraph. Figure 7 (b) gives an example of a face with two bad edges. ∎
We can now characterise when an upward planar singlesource digraph admits an upward planar 2slope drawing.
Theorem 4.4.
Let be an upward plane singlesource digraph with maximum in and outdegree at most two. Then admits an upward planar 2slope drawing if and only if, for every bad edge in the current upward planar embedding of , there is a split pair such that precedes and where exactly the two outgoing edges of are in the split component of that does not contain .
Proof.
If contains no bad edge with its current embedding, then Theorem 3.2 gives us that admits an upward planar 2slope drawing. Otherwise, let be a bad edge with respect to a face . By Lemma 4.2, is not the outer face and thus not a bridge. Let be the second outgoing edge of and the second incoming edge of . Note that and are also on the boundary of . Let be the second face with on its boundary. Without loss of generality, assume is to the left and to the right of .
Suppose there exists a vertex that precedes in and that forms a split pair with . If there are multiple choices for , pick the one closest to . Note that by this choice, cannot be a source. Let be the split component of with respect to that does not contain . This is not a single edge since precedes . Furthermore, by picking closest to , we know that at least two incident edges of are in .
Suppose that only the two outgoing edges of lie inside . We now flip as shown in Figure 8 (a), that is, we reverse the order of incoming and outgoing edges for any vertex in . Note that we only reverse the order for the outgoing edges of . As a result, we get that is no longer a bad edge. The flip cannot introduce a new bade edge, since is not a sink or source of or .
Suppose that an incoming edge of lies inside of . This implies that contains a source . Since is the only source of and not the outer face, we know that is thus the outer face. Therefore, all incoming edges of have to lie in . Since precedes and is to the right of , the left outgoing edge of lies in . This case is illustrated in Figure 8 (b). We see that cannot be flipped and hence remains a bad edge in any upward planar embedding of . The relation of and the edges of is similar when exists but does not precede . Furthermore, since all incoming edges of lie inside of but was picked closest to , there is no other vertex forming a split pair with that also precedes .
If is not part of a split pair (as in Figure 8 (c)), then the triconnectedness implies that , , and always lie on the boundary of the same face and, hence, that is a bad edge.
We conclude that if a flip is possible for every bad edge as shown in Figure 8 (a), then the embedding can be changed until no bad edge remains. ∎
With the characterisation from Theorem 4.4, we can check whether every bad edge can be fixed and if so, perform the necessary flips. Since split components to flip may be nested, executing simply one flip after the other could be costly. We now show how to keep the running time linear.
Theorem 4.5.
Let be an upward planar singlesource digraph with vertices. An upward planar 2slope drawing of can be computed in time, if one exists.
Proof.
First, compute an upward planar embedding of with the algorithm of Bertolazzi et al. [BDBMT98] in time. Second, traverse the boundary of every face to identify all bad edges in time. Third, for each bad edge with respect to a face , check whether it can be repaired with the condition of Theorem 4.4. If this is the case, mark the respective as the beginning and as the end of a split component. This can be done by a simple traversal of . Since by Lemma 4.3 any face contains at most two bad edges, this step takes also only time.
Suppose every bad edge can be fixed. Then run a BFS on that starts at the source. During the traversal, remember the parity of encountered marked beginnings and endings of split components in each vertex. Use this information to decide for each vertex whether its edge order has to be reversed. This takes again only linear time and as a result we get an upward planar embedding of that admits a 2slope representation .
Finally, apply the algorithm from Theorem 3.2 on to compute an upward planar 2slope drawing of . ∎
Note that in Theorem 4.4 whether an edge is bad in any upward planar embedding of is independent from whether another edge is bad in any upward planar embedding of . Hence, we can also use Theorem 4.5 and Corollary 3.3 to minimise the number of bends in a 1bend 2slope drawing of .
Corollary 4.6.
Let be an upward planar singlesource digraph with vertices and maximum in and outdegree two. An upward planar 1bend 2slope drawing of with the minimum number of bends can be computed in time.
4.2 SPQRtrees and upward spirality
Didimo et al. [DGL06, DGL10] described algorithms to compute upward planar embeddings of biconnected seriesparallel and general digraphs. They then use a result from Healy and Lynch [HL07] about combining biconnected blocks of upward planar digraphs to get rid of the biconnectivity condition. We follow their approach closely. In particular, we also use the notions of SPQRtrees and upward spirality (with the latter tailored to our needs) on which Didimo et al.’s approach heavily relies on. We refer to Didimo et al. [DGL10] for the precise definition of SPQRtrees (for undirected graphs and then derived for digraphs), though recall the main concepts in this section.
Let be a biconnected digraph and let be any edge of called reference edge. An SPRQtree of with respect to (wrt) represents a decomposition of with respect to its triconnected components [DBT89, GM01]. As such, it also represents all planar embeddings of with on the outer face. Starting with the split pair , the decomposition is constructed recursively on the split pairs of . More precisely, is a rooted tree where every node is of type S, P, Q, or R: Qnodes represent single edges, Snodes and Pnoes represent series components and parallel components, and Rnodes represent triconnected (rigid) components; see Figure 9 for an example. Each node in has associated a biconnected multigraph , called the skeleton of , in which the children of and its reference edge are represented by a virtual edge. The root of is a Qnode representing . The child of is now defined recursively as follows:
 Trivial case.

If consists of exactly two parallel edges between and , then is a Qnode representing the edge parallel to the reference edge and the skeleton is .
 Parallel case.

If the split pair has three or four split components (more are not possible with our degree restrictions), then is a Pnode. The skeleton consists of parallel edges between and that represent the reference edge and the components , .
 Series case.

If induces two split components and , then is an Snode. If is a chain of biconnected components with cut vertices (), then is the cycle , , , , , , , , where represents .
 Rigid case.

Otherwise is an Rnode. Let , …, be the maximal split pairs of with respect to . Let be the union of split components of except the one containing . Then is obtained from by replacing each subgraph with .
The skeleton of the root consists of two parallel edges, and a virtual edge representing the rest of the graph. Each node of that is not a Qnode has children , in this order such that is a child of based on with respect to . The end vertices of are called the poles of , of , and of . The pertinent graph for a node of represents the full subgraph of in the SPQRtree rooted at . Refer to Figure 9 for an example and note that every edge is represented by a Qnode. We assume that is in its canonical form, that is, every Snode of has exactly two children. The canonical form can be derived from a noncanonical form in linear time [DGL10].
Assume is equipped with an stnumbering (based on its underlying undirected graph and with respect to the reference edge ). Let be a node of with poles and such that precedes in the stnumbering. Then is the first pole and is the second pole of .
Let be a slope representation of the pertinent graph of a node of . Let and be the poles of and let . The pole category of the pole is the way the edges of are incident to and which slopes they got assigned under . The sixteen possible pole categories of split components are shown in Figure 10. Two poles and with pole category and , respectively, are compatible if and can be combined into a pole category of higher degree. For example, combining iR and iL gives iRiL.
Next we define upward spirality, which measures how much a split component is “rolled up”. The pertinent graph of a node of may have 2slope representations with different spirality. Let be a 2slope representation of with first pole and second pole . Let be an undirected path in . Two subsequent edges and of define a left (right) turn if makes a 90 clockwise (resp. counterclockwise) turn at according to . Define the turn number of as the number of right turns minus the number of left turns of . Let and be the clockwise and counterclockwise paths from to along the outer face, respectively. We define the upward slope spirality of as See Figure 11 for examples. Note that the turn number of a path is bounded by its length. Therefore, the number of possible values for the upward slope spirality of is in (and in where is the diameter of ).
Let be a node of with first pole and second pole . A feasible tuple of is a tuple where is an upward 2slope representation of with pole categories and and upward 2slope spirality . Two feasible tuples of are spirality equivalent if they have the same upward slope spirality and pole categories. A feasible set of is a set of all feasible tuples of such that there is exactly one representative tuple for each class of spirality equivalent tuples of .
4.3 Seriesparallel digraphs
Let be a biconnected seriesparallel digraph, that is, an SPQRtree (or rather SPQtree) of contains no R nodes. Our goal is to test the existence of an upward planar embedding and a 2slope representation of that does not contain a bad edge. The idea of the algorithm is as follows. Pick a reference edge and construct the respective SPQRtree of . In a postorder traversal of , compute the feasible set of each node. This is straightforward for Qnodes. For an S or Pnode , try to combine feasible tuples of the children of to feasible tuples of . The pole categories and upward slope spirality values make it easier to check whether a composition admits an upward planar slope representation. If this leads to nonempty feasible set for the root of , we can construct a drawing. Otherwise, we try again with another reference edge.
Let be a Qnode of with first pole and second pole and suppose is the edge (instead of ). Then there are only two upward slope representation of , namely when is assigned the slope or the slope . Therefore, has size two. The following two lemmata show how to compute the feasible set of an Snode and Pnode of .
Lemma 4.7.
Let be a biconnected digraph with vertices and be an SPQRtree of . Let be an Snode of with children and . Given the feasible sets and , the feasible set can be computed in .
Proof.
To compute a feasible tuple of we check for all pairs and whether they can be combined. More precisely, let be the first and the second pole of ; refer to Figure 12. Let be the first and be the second pole of , . Without loss of generality, assume that , , and . For each pair of feasible tuples and check whether and are compatible. In other words, check whether and can be plugged together at under the slope assignments of and .
If the pole categories are compatible, the feasible tuple is given by , , as the series composition of and at the common vertex , and where can be computed as follows. For , let and be the edges of that are incident to and lie on the clockwise and counterclockwise path from to along the outer face, respectively; see Figure 12 (b). Note that may coincide with . For , let be , , or depending on whether and make a left, right, or no turn, respectively. The upward slope spirality of is (compare to Lemma 6.4 by Didimo et al. [DGL10]). Store in if contains no feasible tuple that is spirality equivalent to . Since and have tuples, can be computed in time. ∎
Lemma 4.8.
Let be a biconnected digraph with vertices and be an SPQRtree of . Let be a Pnode of with children with . Given the feasible sets , the feasible set can be computed in .
Proof.
Let be the first and the second pole of (and its children). Since and have at most degree four in , has at most four children (but at least two). Furthermore, four children are only possible in the final composition with the reference edge . We consider the case where has three children. The other two cases work along the same line.
For , let be the pertinent digraph of . Note that and have degree one in . We can thus define and as the edges of incident to and , respectively. (If is a Qnode, then .) Let and be the edges of incident to and respectively that lie outside of . (Note that is only possible in the final composition, where is then also the reference edge.) We want to construct a slope representation of such that the order of at is the reverse order of at ; see Figure 13 (a). Furthermore, the half edges representing and have to be on the outer face.
Suppose we pick a feasible tuple . Then and restrict the choices of pole categories of compatible upward slope representations of and . Likewise, restricts these choices further; see Figure 13 (b) and (c). More precisely, we observe that the upward slope spirality and of compatible and differ from by at least two and at most six (compare to Lemma 6.6 by Didimo et al. [DGL10]). We thus only have to consider feasible tuples in and instead of iterating over complete sets. Storing the feasible tuples in a hash table based on the spirality and pole categories we can find compatible and in constant time. Similar to the seriescomposition, we can compute the upward slope spirality of the resulting upward slope representation based on its categories and , . Hence, by iterating once over we can construct all feasible tuples of in . ∎
Lastly, for the root composition we check in time whether the root of , which is a Qnode representing , can be combined with a feasible tuple of its child. In the affirmative case, we obtain an upward slope representation of . With all compositions described, we can now prove the main theorem of this section.
Theorem 4.9.
Let be a biconnected seriesparallel digraph with vertices. There exists an time algorithm that tests if admits an upward planar 2slope drawing and, if so, that constructs such a drawing.
Proof.
Let be an edge of . Compute the (canonical) SPQRtree with respect to of , which can be done in time [GM01, DGL10]. In a postorder traversal of , the algorithm computes the feasible set for every node of . If the algorithm arrives at a node with an empty feasible set, its starts with another reference of . Otherwise, the algorithm stops when it has constructed a feasible tuple for . We can then use Theorem 3.2 to construct an upward planar 2slope drawing. For one reference edge, this takes at most time per node by Lemmas 4.8 and 4.7. and since the size of is linear in , at most time in total. The total running time is thus in . ∎
In Section 4.5 we explain how to handle nonbiconnected seriesparallel digraphs.
4.4 Biconnected digraphs
We extend the algorithm for biconnected seriesparallel digraphs to general biconnected digraphs following again Didimo et al. [DGL10]. The upward planarity check is again combined with finding a 2slope representation. Let be a biconnected digraph. Let be the SPQRtree of with respect to a reference edge . The algorithm computes again the feasible sets of the nodes of in a postorder traversal. For Q, S, or Pnodes this works as before. Recall that to compute a feasible tuple of an Snode or Pnode it suffices to look at the pole categories and upward spirality of its children. For Rnode this connection is not as clear and we rely thus on a bruteforce approach. More precisely, we compute the feasible set by considering all possible combinations of tuples for each virtual edge of to construct . If substitutions are successful, we have to check upward planarity and the existence of bad edges.
Lemma 4.10.
Let be a biconnected digraph with vertices and be an SPQRtree of . Let be an Rnode of with children . Let be the diameter of . Given the feasible sets , the feasible set can be computed in .
Proof.
Note that since is triconnected, it has a unique planar embedding (up to mirroring), which we can compute in . Note that, by Theorem 3.2, if contains a bad edge with respect to three nonvirtual edges, then is empty. Moreover, then admits no upward planar 2slope drawing and the main algorithm can stop. So suppose no such bad edge exists.
Construct a 2slope representation of by substituting virtual edges with the respective 2slope representations. More precisely, for all , substitute with the slope representation of a feasible tuple in . Let denote the partial upward slope representation of during this process. At each pole of a child in check whether the slope representations of the substituted parts are conflicting. If this check fails, backtrack and try another feasible tuple. Suppose that it is successful for all poles of all . Then test the upward planarity of with the flowbased upward planarity algorithm by Bertolazzi et al. [BDBLM94] where the assignment of switches to faces is given for the substituted parts. This flowbased algorithm runs in time.
If is upward planar, check whether it contains any bad edge and, if not, extend to a slope representation of (compare to Lemma 8.2 by Didimo et al. [DGL10]). Lastly, compute the upward slope spirality of in to obtain a feasible tuple for . By backtracking and trying the remaining feasible tuples of the , we complete the computation of .
Note that is an upper bound on the upward slope spirality of a split component and thus each has feasible tuples. Therefore the algorithm tries at most combinations of feasible tuples of the children of . Hence the feasible set of an Rnode can be computed in , where the factor comes from the flow based upward planarity test. ∎
Let denote the maximum diameter of a split components of and let denote the number of nontrivial triconnected components of , i.e., series components, parallel components, and rigid components.
In total, by Lemma 4.10, the feasible set of all Rnodes can be computed in . Recall that the time needed to compute the feasible set of an Snode is bounded by the square of possible spirality values and thus in . Since we use the canonical form of SPQRtrees there are Snodes. Therefore, we can compute the feasible sets of all Snodes of in time. Similarly, the feasible sets of all Pnodes of can be computed in time. Lastly, iterating over all SPQRtrees of for the different choices of reference edges adds another factor of . If a 2slope representation of has been found, we apply again Theorem 3.2 to compute a drawing. Hence, we get the following theorem.
Theorem 4.11.
Let be a biconnected digraph with vertices. Suppose that has at most nontrivial triconnected components, and that each split component has diameter at most . Then there exists an time algorithm that tests if admits an upward planar 2slope drawing and, if so, that constructs such a drawing of .
4.5 General digraphs
So far we have seen how to test whether a biconnected digraph admits a 2slope representation. For a general digraph , even if each of its biconnected components, called a block, has a 2slope representation we may not be able to join the blocks; see Figure 14. In fact, even all blocks of being upward planar does not imply that is upward planar [HL07]. Nonetheless, following Healy and Lynch [HL07], our strategy is to test for each block if its admits a 2slope representation under some special conditions and, in the affirmative, join these representations.
When we want to merge the representations of two blocks, we have to take two things into consideration. Namely, we have to test whether their joined cut vertex is on the outer face for one of the two blocks and whether their 2slope representations fit together at (just like poles and their pole categories). Before we get into detail on this, we recall what a blockcut tree is and explain how it gives a suitable order to process the blocks.
Blockcut tree.
The blockcut tree of contains a vertex for each block and for each cut vertex, and an edge between a cut vertex and each block that contains . For to admit a 2slope representation, we must be able to root at a block (with all edges oriented towards this root block) such that an edge between a block and cut vertex is oriented towards only if admits a 2slope representation where is on the outer face (see Figure 15 and compare to Lemma 3 by Chan [Cha04]). Note that if we can root at a block , then any other block has exactly one outgoing edge and has only incoming edges. For a block with outgoing edge to a cut vertex , we say is a block with respect to (wrt) .
Suppose we would know how to root . With a postorder traversal of , we could then try to find a 2slope representation for each block wrt of that has on the outer face. However, a priori we do not know at which block to root . Hence, our algorithm works as follows.
Algorithm.
Given , we can find its cut vertices and blocks and construct its blockcut tree in time [Tar72]. Since we do not know what block can function as root of yet, we start at the leaves of and work “inwards”. Note that a leaf block has only one edge in to a cut vertex (unless ) and we can thus provisionally direct to . This yields a block block wrt a cutvertex – wrt . Furthermore, during the algorithm, for at least one nonleaf blocks either all or all but one of its neighboring blocks have been handled. Therefore, during this ad hoc postorder traversal of , we can ensure that we always have at least one block wrt a cutvertex.
To process a block wrt , we check whether has a 2slope representation with (i) on the outer face and (ii) additional constraints on the angles formed at all other cut vertices of , which we describe in detail below. If this is the case, then we can finalize the direction of the edge towards . Otherwise, if does not admit such a 2slope representation, then has to be the root of . We then orient all edges of towards and continue in the remaining part of . If we later find that another block also needs to be the root of , then does not admit a 2slope representation. Furthermore, when we arrive back at , we have to test whether admits a 2slope representation at all.
Note that for a block wrt , where has to be on the outer face of the 2slope representation , the algorithms from the previous two sections only have to consider an SPQRtree with an edge incident to as reference edge.
Angles of cut vertices.
We now describe the additional constraints that have to be checked for a block at all of ’s cut vertices. More precisely, let be a block wrt and let be any other cut vertex of if it has any. Depending on the degree of (and ) in and in the neighboring blocks of , we have the following extra conditions on the angles at and in of .

Suppose (or ) has degree one in . Then is a single edge, is automatically on the outer face in any 2slope representation of , and the angle at in is insignificant.

Suppose has degree two in and has degree two in another block ; see Figure 16 (a). Then has to have a large angle on the outer face in , since otherwise it would not be able to attach to such that is in the outer face of . If the same case applies to , then has to have a large angle in , but not necessarily on the outer face.

Suppose has degree two in and has degree one in two other blocks and . Then we first test if admits a 2slope representation where has a large angle on the outer face; see Figure 16 (b). In this case, both and lie in the outer face of . Otherwise, if has indegree one and outdegree one in , we test whether admits a 2slope representation where forms a flat angle on the outer face; see Figure 16 (c). We test once such that lies on the outer face of and once for . If neither is possible, then has to be the root. For there are no restrictions under these conditions.

The case where (or ) has degree two in and degree one in exactly one other block is similar to the previous case but simpler.

Suppose has degree three in ; see Figure 16 (d). Then has to have a flat angle at on the outer face. Otherwise has to be the root. There are again no restrictions for under these conditions.
These conditions are clearly necessary and, following Healy and Lynch [HL07], also sufficient. Furthermore, they can easily be tested by the algorithms from the previous sections. More precisely, if has degree two in , then its two incident edges are either merged in the root composition or a series composition. Hence, at this step we only keep those 2slope representations with the desired angle at . Otherwise, if has degree three in and has to form a flat angle, we take the sole outgoing or sole incoming edge of in as the reference edge for the SPQRtree. In the root composition we then only allow a merge when there is the desired flat angle at on the outer face.
Result.
The total running time for our algorithm to test whether a general digraph admits a 2slope representation and thus an upward planar 2slope drawing is given by (i) a linear amount for the computation of , (ii) the sum of the checks for each block, and (iii) a linear amount for merging. Hence, we get the following results.
Theorem 4.12.
Let be a seriesparallel digraph with vertices. There exists an time algorithm that tests if admits an upward planar 2slope drawing and, if so, that constructs such a drawing.
Theorem 4.13.
Let be a digraph with vertices. Let be the maximum number of nontrivial triconnected components of a block of , and be the maximum diameter of a split component of a block of . Then there exists an time algorithm that tests if admits an upward planar 2slope drawing and, if so, that constructs such a drawing of .
5 Phylogenetic networks
Recall from Section 1 that a phylogenetic network is a singlesource digraph whose sinks are all leaves and whose nonsink, nonsource vertices have degree three. In this section we show how to find an upward planar 2slope drawing of a phylogenetic network such that its leaves lie on a horizontal line – if admits such a drawing. Since we want that all leaves are on the outer face, we first merge them into a single vertex and then apply the lineartime algorithm of Bertolazzi et al. [BDBMT98] to test whether the resulting digraph is upward planar. Clearly, is upward planar if and only if admits a desired upward planar embedding. In the affirmative case, let now be an upward plane phylogenetic network such that its leaves lie on the outer face. Further assume that contains no bad edge or, in this case equivalently, no transitive edge.
In Section 3, we constructed an upward planar 2slope drawing by implementing the refinement step, which augments all faces to rectangular faces, and by applying a compaction algorithm [KKM01]. In order to obtain a drawing where all leaves lie on the same horizontal line, we apply this algorithm to the following augmentation of . Let be the leaves of in clockwise order around the outer face. Add new vertices and edges and , ; see Figure 17 (a). Then apply Theorem 3.2 to to obtain an upward planar 2slope drawing of in time.
We observe from Figure 17 (b) that two vertices and of (neighboring leaves of ) have different ycoordinates if and only if and have different lengths. This can be fixed by propagating these length differences through the drawing in the following way (Figure 17 (c–d)). Let be the dual graph of . Furthermore, define and as the two subgraphs of with and where and are the dual edges of primal edges with slope and , respectively. In other words, is the dual graph of restricted to edges with slope . Direct every edge in () with primal edge from the left (right) face of to the right (left) face of . Assign each dual edge as flow the length of its primal edge. Split the vertex corresponding to the outer face of into a source and sinks such that has the incoming edges dual to the edges and ; see Figure 17 (c). These dual graphs can be constructed in linear time.
Next, to adjust the heights of the leaves of , for every pair and , , if, say, is shorter than , propagate the difference as flow backwards towards through ; see Figure 17 (d). With one DFS on and each, all leaves can be handled simultaneously and in linear time. Lastly, since some edge lengths have been changed, update the coordinates of all vertices in and remove the vertices , , to obtain an upward planar 2slope drawing of . The following theorem summarises this section.
Theorem 5.1.
Let be a phylogenetic network with vertices and no transitive edge. If admits an upward planar drawing with all its leaves on the outer face, then admits and upward planar 2slope drawing such that all its leaves lie on a horizontal line. Moreover, such a drawing can be constructed in time.
Note that by Corollary 4.6 a phylogenetic network with transitive edges admits a upward planar 1bend 2slope drawing with at most bends.
6 Concluding remarks
When considering the number of slopes in a graph drawing, one typically asks how many different slopes are necessary for a graph of certain graph class. Here we instead constrained the number of slopes to two and asked what digraphs can then be drawn upward planar. Our digraphs are thus limited to those that contain no transitive edges and have a small maximum degree. Beyond that, the difficulty of the problem depends on whether or not an upward planar embedding is given and on the complexity of the digraph.
We have shown that if the embedding is fixed then the question can be answered and, in the affirmative, a drawing constructed in linear time. In this case the problem boils down to whether there is a bad edge for the given embedding and, if not, to adapt algorithms for orthogonal drawings. However, even if there are bad edges present, allowing each of them to bend once is enough to obtain upward planar 1bend 2slope drawing with minimum number of bends. We conjecture that it is NPhard to minimize the drawing area of an upward planar 2slope drawing just like it is for orthogonal drawings [Pat01]. It would be interesting to see a proof for this and how compaction algorithms for orthogonal drawings can be applied to upward planar drawings.
If a given digraph is not embedded yet, we first have to check whether the digraph is upward planar. For singlesource digraph, we have seen that it suffices to find one upward planar embedding, which may then be altered to one without bad edges if it exists. For seriesparallel and general digraphs we reused an approach by Didimo et al. [DGL10] based on SPQRtrees and upward spirality to find a quartic time and a fixedparameter tractable algorithm, respectively. An important difference is that our algorithm does not only compute upward planar embeddings for nodes of the SPQRtree but also 2slope representations. Through the degree restrictions the algorithm became simpler and can thus also consider other properties. It would be interesting to see whether the algorithm that computes an upward planar embedding of a singlesource digraph can be modified to directly compute a 2slope representation.
This research was motivated by drawings of phylogenetic networks. While we here assumed that a given phylogenetic network is upward planar, this is not a biologically motivated property of phylogenetic networks. One may argue that phylogenetic networks often have few reticulations (vertices with indegree two or higher), but even just two reticulations suffice to obstruct upward planarity. Hence, it would be interesting to have algorithms that can also draw nonupward planar phylogenetic network with two slopes.
The biggest challenges remain for drawings with more than two slopes. Our feeling is that while the complexity of developing algorithms to draw graphs with two slopes is manageable, three or more slopes increase the geometric interdependence dramatically. While the companion paper by Klawitter and Zink [KZ21] started to investigate this, we would be happy to see more results on upward planar slope numbers of graphs.
[1]ReferencesReferences
References
 [BBB09] C. Bachmaier, F. J. Brandenburg, W. Brunner, A. Hofmeier, M. Matzeder, and T. Unfried, “Tree drawings on the hexagonal grid,” in Graph Drawing, I. G. Tollis and M. Patrignani, Eds. Springer, 2009, pp. 372–383.
 [BBS05] C. Bachmaier, U. Brandes, and B. Schlieper, “Drawing phylogenetic trees,” in Algorithms and Computation, X. Deng and D.Z. Du, Eds. Springer, 2005, pp. 1110–1121.
 [BDBLM94] P. Bertolazzi, G. Di Battista, G. Liotta, and C. Mannino, “Upward drawings of triconnected digraphs,” Algorithmica, vol. 12, no. 6, pp. 476–497, 1994.
 [BDBMT98] P. Bertolazzi, G. Di Battista, C. Mannino, and R. Tamassia, “Optimal Upward Planarity Testing of SingleSource Digraphs,” SIAM Journal on Computing, vol. 27, no. 1, pp. 132–169, 1998.
 [BDGD18] M. A. Bekos, E. Di Giacomo, W. Didimo, G. Liotta, and F. Montecchiani, “Universal Slope Sets for Upward Planar Drawings,” in Graph Drawing and Network Visualization, T. Biedl and A. Kerren, Eds. Springer International Publishing, 2018, pp. 77–91.
 [BDM12] A. Boc, A. B. Diallo, and V. Makarenkov, “TREX: a web server for inferring, validating and visualizing phylogenetic trees and networks,” Nucleic Acids Research, vol. 40, no. W1, pp. W573–W579, 2012.
 [BKM19] G. Brückner, N. D. Krisam, and T. Mchedlidze, “Levelplanar drawings with few slopes,” in Graph Drawing and Network Visualization, D. Archambault and C. D. Tóth, Eds., 2019, pp. 559–572.
 [BM11] W. Brunner and M. Matzeder, “Drawing ordered (k1)ary trees on kgrids,” in Graph Drawing, U. Brandes and S. Cornelsen, Eds. Springer, 2011, pp. 105–116.
 [BM13] C. Bachmaier and M. Matzeder, “Drawing unordered trees on kgrids,” Journal of Graph Algorithms and Applications, vol. 17, no. 2, pp. 103–128, 2013.
 [CDP92] P. Crescenzi, G. Di Battista, and A. Piperno, “A note on optimal area algorithms for upward drawings of binary trees,” Computational Geometry, vol. 2, no. 4, pp. 187–200, 1992.
 [Cha04] H. Chan, “A Parameterized Algorithm for Upward Planarity Testing,” in Algorithms – ESA 2004, S. Albers and T. Radzik, Eds. Springer, 2004, pp. 157–168.
 [CPR90] J. Czyzowicz, A. Pelc, and I. Rival, “Drawing orders with few slopes,” Discrete Mathematics, vol. 82, no. 3, pp. 233–250, 1990.
 [Czy91] J. Czyzowicz, “Lattice diagrams with few slopes,” Journal of Combinatorial Theory, Series A, vol. 56, no. 1, pp. 96–108, 1991.
 [DBT88] G. Di Battista and R. Tamassia, “Algorithms for plane representations of acyclic digraphs,” Theoretical Computer Science, vol. 61, no. 2, pp. 175–198, 1988.
 [DBT89] ——, “Incremental planarity testing,” in 30th Annual Symposium on Foundations of Computer Science, 1989, pp. 436–441.
 [DESW07] V. Dujmović, D. Eppstein, M. Suderman, and D. R. Wood, “Drawings of planar graphs with few slopes and segments,” Computational Geometry, vol. 38, no. 3, pp. 194–212, 2007.
 [DETT99] G. Di Battista, P. Eades, R. Tamassia, and I. G. Tollis, Graph Drawing: Algorithms for the Visualization of Graphs. PrenticeHall, 1999.
 [DGL06] W. Didimo, F. Giordano, and G. Liotta, “Upward Spirality and Upward Planarity Testing,” in Graph Drawing, P. Healy and N. S. Nikolov, Eds. Springer, 2006, pp. 117–128.
 [DGL10] ——, “Upward Spirality and Upward Planarity Testing,” SIAM Journal on Discrete Mathematics, vol. 23, no. 4, pp. 1842–1899, 2010.
 [DGLM18] E. Di Giacomo, G. Liotta, and F. Montecchiani, “Drawing subcubic planar graphs with four slopes and optimal angular resolution,” Theoretical Computer Science, vol. 714, pp. 51–73, 2018.
 [DGLM20] ——, “1bend upward planar slope number of SPdigraphs,” Computational Geometry, vol. 90, p. 101628, 2020.
 [Dun14] M. Dunn, “Language phylogenies,” in The Routledge Handbook of Historical Linguistics, C. Bowern and B. Evans, Eds. Routledge, 2014, ch. 7.
 [Epp13] D. Eppstein, “The Complexity of Bendless ThreeDimensional Orthogonal Graph Drawing,” Journal of Graph Algorithms and Applications, vol. 17, no. 1, pp. 35–55, 2013.
 [GM01] C. Gutwenger and P. Mutzel, “A Linear Time Implementation of SPQRTrees,” in Graph Drawing, J. Marks, Ed. Springer, 2001, pp. 77–90.
 [GT01] A. Garg and R. Tamassia, “On the Computational Complexity of Upward and Rectilinear Planarity Testing,” SIAM Journal on Computing, vol. 31, no. 2, pp. 601–625, 2001.
 [HB05] D. H. Huson and D. Bryant, “Application of Phylogenetic Networks in Evolutionary Studies,” Molecular Biology and Evolution, vol. 23, no. 2, pp. 254–267, 2005.
 [HL06] P. Healy and K. Lynch, “Two fixedparameter tractable algorithms for testing upward planarity,” International Journal of Foundations of Computer Science, vol. 17, no. 05, pp. 1095–1114, 2006.
 [HL07] P. Healy and K. Lynch, “Building blocks of upward planar digraphs,” Journal of Graph Algorithms and Applications, vol. 11, no. 1, pp. 3–44, 2007.
 [Hof17] U. Hoffmann, “On the Complexity of the Planar Slope Number Problem,” Journal of Graph Algorithms and Applications, vol. 21, no. 2, pp. 183–193, 2017.
 [HRS10] D. H. Huson, R. Rupp, and C. Scornavacca, Phylogenetic Networks: Concepts, Algorithms and Applications. Cambridge University Press, 2010.
 [HS12] D. H. Huson and C. Scornavacca, “Dendroscope 3: An Interactive Tool for Rooted Phylogenetic Trees and Networks,” Systematic Biology, vol. 61, no. 6, pp. 1061–1067, 2012.
 [Hus09] D. H. Huson, “Drawing Rooted Phylogenetic Networks,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 6, no. 1, pp. 103–109, 2009.
 [JJK13] V. Jelínek, E. Jelínková, J. Kratochvíl, B. Lidický, M. Tesař, and T. Vyskočil, “The Planar Slope Number of Planar Partial 3Trees of Bounded Degree,” Graphs and Combinatorics, vol. 29, no. 4, pp. 981–1005, 2013.
 [KH08] T. H. Kloepper and D. H. Huson, “Drawing explicit phylogenetic networks and their integration into splitstree,” BMC Evolutionary Biology, vol. 8, no. 1, p. 22, 2008.
 [KKM01] G. W. Klau, K. Klein, and P. Mutzel, “An experimental comparison of orthogonal compaction algorithms,” in Graph Drawing, J. Marks, Ed. Springer, 2001, pp. 37–51.
 [KMSS18] P. Kindermann, F. Montecchiani, L. Schlipf, and A. Schulz, “Drawing Subcubic 1Planar Graphs with Few Bends, Few Slopes, and Large Angles,” in Graph Drawing and Network Visualization, T. Biedl and A. Kerren, Eds. Springer, 2018, pp. 152–166.
 [KMW14] K. Knauer, P. Micek, and B. Walczak, “Outerplanar graph drawings with few slopes,” Computational Geometry, vol. 47, no. 5, pp. 614–624, 2014.
 [KZ21] J. Klawitter and J. Zink, “Upward Planar Drawings with Three Slopes,” CoRR, vol. abs/2103.06801, 2021. [Online]. Available: https://arxiv.org/abs/2103.06801
 [LLMN13] W. Lenhart, G. Liotta, D. Mondal, and R. I. Nishat, “Planar and Plane Slope Number of Partial 2Trees,” in Graph Drawing, S. Wismath and A. Wolff, Eds. Springer, 2013, pp. 412–423.
 [MP12] P. Mukkamala and D. Pálvölgyi, “Drawing Cubic Graphs with the Four Basic Slopes,” in Graph Drawing, M. van Kreveld and B. Speckmann, Eds. Springer, 2012, pp. 254–265.
 [NW11] M. Nöllenburg and A. Wolff, “Drawing and labeling highquality metro maps by mixedinteger programming,” IEEE Transactions on Visualization and Computer Graphics, vol. 17, no. 5, pp. 626–641, 2011.
 [Pap95] A. Papakostas, “Upward planarity testing of outerplanar dags,” in Graph Drawing, R. Tamassia and I. G. Tollis, Eds. Springer, 1995, pp. 298–306.
 [Pat01] M. Patrignani, “On the complexity of orthogonal compaction,” Computational Geometry, vol. 19, no. 1, pp. 47–67, 2001.
 [PP06] J. Pach and D. Pálvölgyi, “Boundeddegree graphs can have arbitrarily large slope numbers,” Electronic Journal of Combinatorics, vol. 13, no. 1, p. N1, 2006.
 [RNN03] M. S. Rahman, M. Naznin, and T. Nishizeki, “Orthogonal Drawings of Plane Graphs Without Bends,” Journal of Graph Algorithms and Applications, vol. 7, no. 4, pp. 335–362, 2003.
 [Sch15] A. Schulz, “Drawing graphs with few arcs,” Journal of Graph Algorithms and Applications, vol. 19, no. 1, pp. 393–412, 2015.
 [Ste16] M. Steel, Phylogeny: Discrete and Random Processes in Evolution. Society for Industrial and Applied Mathematics, 2016.
 [SVGB21] K. Schliep, M. VidalGarcía, L. Biancani, F. H. Diaz, E. Ada, and C. SolísLemus, “tanggle: Visualization of phylogenetic networks in a ggplot2 framework,” 2021. [Online]. Available: https://klausvigo.github.io/tanggle/articles/tanggle_vignette.html
 [Tam87] R. Tamassia, “On Embedding a Graph in the Grid with the Minimum Number of Bends,” SIAM Journal on Computing, vol. 16, no. 3, pp. 421–444, 1987.
 [Tar72] R. Tarjan, “Depthfirst search and linear graph algorithms,” SIAM Journal on Computing, vol. 1, no. 2, pp. 146–160, 1972.
 [TK16] I. G. Tollis and K. G. Kakoulis, “Algorithms for Visualizing Phylogenetic Networks,” in Graph Drawing and Network Visualization, Y. Hu and M. Nöllenburg, Eds. Springer, 2016, pp. 183–195.
 [Vau17] T. G. Vaughan, “IcyTree: rapid browserbased visualization for phylogenetic trees and networks,” Bioinformatics, vol. 33, no. 15, pp. 2392–2394, 2017.
 [WC94] G. A. Wade and J.H. Chu, “Drawability of Complete Graphs Using a Minimal Slope Set,” The Computer Journal, vol. 37, no. 2, pp. 139–142, 1994.
Comments
There are no comments yet.