| plot_difference | R Documentation |
Plots the difference between two networks (x - y) with splot.
Positive differences (x > y) are shown in pos_color and negative
differences (x < y) in neg_color. Node-level differences, such as
initial probabilities, can be shown as donut charts.
plot_difference(
x,
y = NULL,
i = NULL,
j = NULL,
pos_color = "#009900",
neg_color = "#C62828",
labels = NULL,
title = NULL,
inits_x = NULL,
inits_y = NULL,
show_inits = NULL,
donut_inner_ratio = 0.8,
force = FALSE,
combined = TRUE,
difference = FALSE,
...
)
x |
First network: matrix, |
y |
Second network, of the same type as |
i |
Index or name of the first group when |
j |
Index or name of the second group, with the same rules as
|
pos_color |
Color for positive differences (x > y). |
neg_color |
Color for negative differences (x < y). |
labels |
Node labels. |
title |
Plot title. |
inits_x |
Node values for x (e.g., initial probabilities). |
inits_y |
Node values for y. |
show_inits |
Logical. Show node differences as donuts? |
donut_inner_ratio |
Inner radius ratio for donut (0-1). |
force |
Logical. Plot all pairs for a |
combined |
Logical. When |
difference |
Logical. If |
... |
Additional arguments passed to |
The weight matrices are subtracted element-wise. Both networks must have the same dimensions and, when present, the same node labels; otherwise the function stops with an error. A directed difference (or tna input) is styled with the TNA preset and an undirected difference with the psychometric preset.
When node values (inits) are given or extracted from tna objects, each node
is shown as a donut whose filled fraction is the absolute difference,
capped at 1, colored pos_color when x is higher and
neg_color when y is higher.
plot_compare() is an alias of plot_difference().
Invisibly, a list with elements weights (the element-wise
difference matrix x - y) and inits (the node-value
difference, or NULL when no node values were available). For the
group_tna all-pairs path, a named list of such lists with one
element per pair, named "<group_i>_vs_<group_j>".
plot_compare, plot_comparison_heatmap
plot_difference(regulation_net, t(regulation_net))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.