| align_layout | R Documentation |
layout_with_fr().Align a vertex layout
This function centers a vertex layout on the coordinate system origin and
rotates the layout to achieve a visually pleasing alignment with the coordinate
axes. Doing this is particularly useful with force-directed layouts such as layout_with_fr().
align_layout(graph, layout)
graph |
The graph whose layout is to be aligned. |
layout |
A matrix whose rows are the coordinates of vertices. |
modified layout matrix
g <- make_lattice(c(3, 3))
l1 <- layout_with_fr(g)
l2 <- align_layout(g,l1)
plot(g, layout = l1)
plot(g, layout = l2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.