View source: R/layout_stress.R
layout_tbl_graph_stress | R Documentation |
This layout is related to the stress-minimization algorithm known as Kamada-Kawai (available as the 'kk' layout), but uses another optimization strategy. It generally have better runtime, quality, and stability compared to the Kamada-Kawai layout and is thus generally preferred. The sparse version of the layout have better performance (especially on larger networks) at the expense of layout quality, but will generally outperform many other algorithms for large graphs in both runtime and quality (e.g. the 'drl' layout from igraph).
layout_tbl_graph_stress(
graph,
weights = NULL,
niter = 500,
tolerance = 1e-04,
mds = TRUE,
bbox = 50,
x = NULL,
y = NULL,
circular = FALSE
)
layout_tbl_graph_sparse_stress(
graph,
pivots,
weights = NULL,
niter = 500,
circular = FALSE
)
graph |
a tbl_graph object |
weights |
An expression evaluated on the edge data to provide edge weights for the layout. Currently ignored for the sparse version |
niter |
number of iterations during stress optimization |
tolerance |
stopping criterion for stress optimization |
mds |
should an MDS layout be used as initial layout (default: TRUE) |
bbox |
constrain dimension of output. Only relevant to determine the placement of disconnected graphs. |
x , y |
Expressions evaluated on the node data giving
coordinates along x and/or y axis to fix nodes to. You can chose to only fix
selected nodes by leaving the remaining nodes with |
circular |
ignored |
pivots |
The number of pivot nodes. |
A data.frame with the columns x
, y
, circular
as
well as any information stored as node variables in the tbl_graph object.
The underlying algorithm is implemented in the graphlayouts package by David Schoch
Gansner, E. R., Koren, Y., & North, S. (2004). Graph drawing by stress majorization. In International Symposium on Graph Drawing (pp. 239-250). Springer, Berlin, Heidelberg.
Ortmann, M. and Klimenta, M. and Brandes, U. (2016). A Sparse Stress Model. https://arxiv.org/pdf/1608.08909.pdf
Other layout_tbl_graph_*:
layout_tbl_graph_auto()
,
layout_tbl_graph_backbone()
,
layout_tbl_graph_cactustree()
,
layout_tbl_graph_centrality()
,
layout_tbl_graph_circlepack()
,
layout_tbl_graph_dendrogram()
,
layout_tbl_graph_eigen()
,
layout_tbl_graph_fabric()
,
layout_tbl_graph_focus()
,
layout_tbl_graph_hive()
,
layout_tbl_graph_htree()
,
layout_tbl_graph_igraph()
,
layout_tbl_graph_linear()
,
layout_tbl_graph_manual()
,
layout_tbl_graph_matrix()
,
layout_tbl_graph_metro()
,
layout_tbl_graph_partition()
,
layout_tbl_graph_pmds()
,
layout_tbl_graph_sf()
,
layout_tbl_graph_treemap()
,
layout_tbl_graph_unrooted()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.