g_layout: Layout with group

g_layoutR Documentation

Layout with group

Description

Layout with group

Layout with group nicely

Usage

g_layout(
  go,
  group = "module",
  group_order = NULL,
  layout1 = in_circle(),
  zoom1 = 20,
  layout2 = in_circle(),
  zoom2 = 3,
  show_big_layout = FALSE,
  ...
)

g_layout_nice(go, group = "module", mode = "circlepack", ...)

Arguments

go

igraph or metanet

group

group name (default: module)

group_order

group_order

layout1

layout1 method, one of (1) a dataframe or matrix: rowname is group, two columns are X and Y (2) function: layout method for c_net_layout default: in_circle()

zoom1

big network layout size

layout2

one of functions: layout method for c_net_layout, or a list of functions.

zoom2

average sub_network layout size, or numeric vector, or "auto"

show_big_layout

show the big layout to help you adjust.

...

add

mode

circlepack, treemap, backbone, stress

Value

coors

See Also

Other g_layout: g_layout_polygon()

Examples


data("c_net")
module_detect(co_net, method = "cluster_fast_greedy") -> co_net_modu
g_layout(co_net_modu, group = "module", zoom1 = 30, zoom2 = "auto", layout2 = as_line()) -> oridata
plot(co_net_modu, coors = oridata)


data("c_net")
module_detect(co_net, method = "cluster_fast_greedy") -> co_net_modu
if (requireNamespace("ggraph")) {
  plot(co_net_modu, coors = g_layout_nice(co_net_modu, group = "module"))
  plot(co_net_modu, coors = g_layout_nice(co_net_modu, group = "module", mode = "treemap"))
}


MetaNet documentation built on May 29, 2024, 1:21 a.m.