File: align_layout.Rd

package info (click to toggle)
r-cran-igraph 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,772 kB
  • sloc: ansic: 206,420; cpp: 21,827; fortran: 4,090; yacc: 1,229; lex: 518; sh: 52; makefile: 8
file content (32 lines) | stat: -rw-r--r-- 1,094 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout.R
\name{align_layout}
\alias{align_layout}
\title{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 \code{\link[=layout_with_fr]{layout_with_fr()}}.}
\usage{
align_layout(graph, layout)
}
\arguments{
\item{graph}{The graph whose layout is to be aligned.}

\item{layout}{A matrix whose rows are the coordinates of vertices.}
}
\value{
modified layout matrix
}
\description{
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 \code{\link[=layout_with_fr]{layout_with_fr()}}.
}
\examples{
g <- make_lattice(c(3, 3))
l1 <- layout_with_fr(g)
l2 <- align_layout(g,l1)
plot(g, layout = l1)
plot(g, layout = l2)
}