ggtopo.topology {isotracer}R Documentation

Plot a topology

Description

A quick plot using ggraph

Usage

## S3 method for class 'topology'
ggtopo(x, layout = "auto", edge = "fan", ...)

Arguments

x

A topology matrix.

layout

Optional, layout to use (e.g. "sugiyama", "kk", "stress")

edge

"curve" (the default), "line" or "fan".

...

Not used for now.

Value

A ggplot2 plot.

Examples

if (requireNamespace("ggraph")) {
  z <- topo(aquarium_mod)
  ggtopo(z)
  ggtopo(z, edge = "line")

  z <- topo(trini_mod)
  ggtopo(z)

  # For finer control, one can build a tbl_graph from the topology and
  # use ggraph directly
  x <- as_tbl_graph(z)
  library(ggraph)
  ggraph(x) + geom_edge_link()
}


[Package isotracer version 1.1.6 Index]