layout_with_kk | R Documentation |
Place the vertices on the plane, or in 3D space, based on a physical model of springs.
layout_with_kk(
graph,
coords = NULL,
dim = 2,
maxiter = 50 * vcount(graph),
epsilon = 0,
kkconst = max(vcount(graph), 1),
weights = NULL,
minx = NULL,
maxx = NULL,
miny = NULL,
maxy = NULL,
minz = NULL,
maxz = NULL,
niter = deprecated(),
sigma = deprecated(),
initemp = deprecated(),
coolexp = deprecated(),
start = deprecated()
)
with_kk(...)
See the referenced paper below for the details of the algorithm.
This function was rewritten from scratch in igraph version 0.8.0 and it follows truthfully the original publication by Kamada and Kawai now.
A numeric matrix with two (dim=2) or three (dim=3) columns, and as many rows as the number of vertices, the x, y and potentially z coordinates of the vertices.
Gabor Csardi csardi.gabor@gmail.com
Kamada, T. and Kawai, S.: An Algorithm for Drawing General Undirected Graphs. Information Processing Letters, 31/1, 7–15, 1989.
layout_with_drl()
, plot.igraph()
,
tkplot()
Other graph layouts:
add_layout_()
,
component_wise()
,
layout_()
,
layout_as_bipartite()
,
layout_as_star()
,
layout_as_tree()
,
layout_in_circle()
,
layout_nicely()
,
layout_on_grid()
,
layout_on_sphere()
,
layout_randomly()
,
layout_with_dh()
,
layout_with_fr()
,
layout_with_gem()
,
layout_with_graphopt()
,
layout_with_lgl()
,
layout_with_mds()
,
layout_with_sugiyama()
,
merge_coords()
,
norm_coords()
,
normalize()
g <- make_ring(10)
E(g)$weight <- rep(1:2, length.out = ecount(g))
plot(g, layout = layout_with_kk, edge.label = E(g)$weight)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.