View source: R/plot-simplicial.R
| plot_simplicial | R Documentation |
Visualize higher-order pathways as smooth blobs overlaid on a network layout. Source nodes are blue, target nodes are red.
plot_simplicial(
x = NULL,
pathways = NULL,
method = "hon",
max_pathways = 10L,
pathway_index = NULL,
anomaly = c("all", "over", "under"),
layout = "circle",
labels = NULL,
node_color = "#4A7FB5",
target_color = "#E8734A",
ring_color = "#F5A623",
node_size = 22,
label_size = 5,
label_color = "#e8e8e8",
target_label_color = NULL,
label_halo = TRUE,
label_halo_color = NULL,
label_halo_width = 0.035,
label_halo_alpha = 0.6,
blob_alpha = 0.25,
blob_colors = NULL,
blob_linetype = NULL,
blob_linewidth = 0.7,
blob_line_alpha = 0.8,
shadow = TRUE,
title = NULL,
dismantled = FALSE,
ncol = NULL,
...
)
x |
A network object: |
pathways |
Character vector of pathway strings, a list of
character vectors, a |
method |
Pathway source when auto-building from a
|
max_pathways |
Maximum number of pathways to display. HON
pathways are ranked by count, HYPA by anomaly ratio.
|
pathway_index |
Optional positive integer vector selecting
ranked pathways after extraction and ranking, before
|
anomaly |
HYPA anomaly type to display when plotting a
|
layout |
|
labels |
Display labels. |
node_color |
Source node fill color. |
target_color |
Target node fill color. |
ring_color |
Donut ring color. |
node_size |
Node point size. |
label_size |
Label text size. |
label_color |
Label text color (default |
target_label_color |
Target-node label color. |
label_halo |
Logical. Draw a contrasting halo behind each
label so it stays readable on any fill — node disc, blob, or
the white canvas. Default |
label_halo_color |
Halo color. |
label_halo_width |
Halo thickness in plot units. Default
|
label_halo_alpha |
Halo opacity (0–1). Default |
blob_alpha |
Blob fill transparency. |
blob_colors |
Blob fill colors (recycled). |
blob_linetype |
Blob border line styles (recycled). |
blob_linewidth |
Blob border line width. |
blob_line_alpha |
Blob border line transparency. |
shadow |
Draw soft drop shadows? |
title |
Plot title. |
dismantled |
If |
ncol |
Number of columns in the grid when |
... |
Additional arguments passed to
|
Supports direct use with tna and netobject models:
when x has sequence data, HON or HYPA pathways are built
automatically (requires the Nestimate package). Pathways can
also be passed as net_hon or net_hypa objects, with
labels auto-translated when x is a tna/netobject.
A ggplot object (or combined grid if dismantled),
invisibly.
set.seed(1)
mat <- matrix(runif(16), 4, 4,
dimnames = list(LETTERS[1:4], LETTERS[1:4]))
diag(mat) <- 0
plot_simplicial(mat, c("A B -> C", "B C -> D"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.