From fa585f2446e361c509b601860652f8506589d2c5 Mon Sep 17 00:00:00 2001 From: Thomas Lin Pedersen Date: Sun, 14 Jan 2024 23:06:26 +0100 Subject: [PATCH] Update ggraph docs with unlinked layout --- R/ggraph.R | 26 ++++++++++++++++++++++++++ R/layout_unrooted.R | 2 +- man/ggraph.Rd | 29 +++++++++++++++++++++++++++++ man/layout_tbl_graph_unrooted.Rd | 2 +- 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/R/ggraph.R b/R/ggraph.R index 3167e3a5..9c0f0b51 100644 --- a/R/ggraph.R +++ b/R/ggraph.R @@ -57,6 +57,32 @@ #' \item{`cactustree`}{Positions nodes as circles on the periphery of their #' parent circle. See [layout_tbl_graph_cactustree()] for further #' details} +#' \item{`backbone`}{Layout optimised for highly connected small-world graphs +#' such as social networks. See [layout_tbl_graph_backbone()] for further +#' details} +#' \item{`centrality`}{Place nodes around origin based on their centrality. +#' See [layout_tbl_graph_centrality()] for further +#' details} +#' \item{`eigen`}{Spectral layout based on the eigenvector of a matrix +#' representation of the graph. See [layout_tbl_graph_eigen()] for further +#' details} +#' \item{`fabric`}{Draw nodes as horizontal lines and connect them with +#' vertical lines if an edge exists between them. See +#' [layout_tbl_graph_fabric()] for further +#' details} +#' \item{`focus`}{Place nodes around a focus node based on their distance to +#' that node. See [layout_tbl_graph_focus()] for further +#' details} +#' \item{`pmds`}{Layout based on multidimensional scaling of a set of pivot +#' nodes, allowing MDS layout to be used on larger graphs. See +#' [layout_tbl_graph_pmds()] for further +#' details} +#' \item{`stress`}{Layout based on stress minimisation with better stability +#' than Kamada-Kawai layout. See [layout_tbl_graph_stress()] for further +#' details} +#' \item{`unrooted`}{Draws unrooted trees based on equal angle with optional +#' equal daylight modification. See [layout_tbl_graph_unrooted()] for further +#' details} #' } #' #' Alternatively a matrix or a data.frame can be provided to the `layout` diff --git a/R/layout_unrooted.R b/R/layout_unrooted.R index e2d445ba..427f8464 100644 --- a/R/layout_unrooted.R +++ b/R/layout_unrooted.R @@ -5,7 +5,7 @@ #' leafs out on the plane without putting any special emphasis on a particular #' node using an unrooted layout. The standard algorithm is the equal angle #' algorithm, but it can struggle with optimising the leaf distribution for -#' large trees trees with very uneven branch length. The equal daylight +#' large trees with very uneven branch length. The equal daylight #' algorithm modifies the output of the equal angle algorithm to better disperse #' the leaves, at the cost of higher computational cost and the possibility of #' edge crossings for very large unbalanced trees. For standard sized trees the diff --git a/man/ggraph.Rd b/man/ggraph.Rd index 699b6b8f..ee766554 100644 --- a/man/ggraph.Rd +++ b/man/ggraph.Rd @@ -101,6 +101,35 @@ subdivides the division given by the preceding layer. See \item{\code{hive}}{Positions nodes on axes spreading out from the center based on node attributes. See \code{\link[=layout_tbl_graph_hive]{layout_tbl_graph_hive()}} for further details} +\item{\code{cactustree}}{Positions nodes as circles on the periphery of their +parent circle. See \code{\link[=layout_tbl_graph_cactustree]{layout_tbl_graph_cactustree()}} for further +details} +\item{\code{backbone}}{Layout optimised for highly connected small-world graphs +such as social networks. See \code{\link[=layout_tbl_graph_backbone]{layout_tbl_graph_backbone()}} for further +details} +\item{\code{centrality}}{Place nodes around origin based on their centrality. +See \code{\link[=layout_tbl_graph_centrality]{layout_tbl_graph_centrality()}} for further +details} +\item{\code{eigen}}{Spectral layout based on the eigenvector of a matrix +representation of the graph. See \code{\link[=layout_tbl_graph_eigen]{layout_tbl_graph_eigen()}} for further +details} +\item{\code{fabric}}{Draw nodes as horizontal lines and connect them with +vertical lines if an edge exists between them. See +\code{\link[=layout_tbl_graph_fabric]{layout_tbl_graph_fabric()}} for further +details} +\item{\code{focus}}{Place nodes around a focus node based on their distance to +that node. See \code{\link[=layout_tbl_graph_focus]{layout_tbl_graph_focus()}} for further +details} +\item{\code{pmds}}{Layout based on multidimensional scaling of a set of pivot +nodes, allowing MDS layout to be used on larger graphs. See +\code{\link[=layout_tbl_graph_pmds]{layout_tbl_graph_pmds()}} for further +details} +\item{\code{stress}}{Layout based on stress minimisation with better stability +than Kamada-Kawai layout. See \code{\link[=layout_tbl_graph_stress]{layout_tbl_graph_stress()}} for further +details} +\item{\code{unrooted}}{Draws unrooted trees based on equal angle with optional +equal daylight modification. See \code{\link[=layout_tbl_graph_unrooted]{layout_tbl_graph_unrooted()}} for further +details} } Alternatively a matrix or a data.frame can be provided to the \code{layout} diff --git a/man/layout_tbl_graph_unrooted.Rd b/man/layout_tbl_graph_unrooted.Rd index df64d73c..4f5db93d 100644 --- a/man/layout_tbl_graph_unrooted.Rd +++ b/man/layout_tbl_graph_unrooted.Rd @@ -42,7 +42,7 @@ implicitly creates a visual root node. Instead it is possible to spread the leafs out on the plane without putting any special emphasis on a particular node using an unrooted layout. The standard algorithm is the equal angle algorithm, but it can struggle with optimising the leaf distribution for -large trees trees with very uneven branch length. The equal daylight +large trees with very uneven branch length. The equal daylight algorithm modifies the output of the equal angle algorithm to better disperse the leaves, at the cost of higher computational cost and the possibility of edge crossings for very large unbalanced trees. For standard sized trees the