File: layout_spectral.Rd

package info (click to toggle)
r-cran-graphlayouts 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,660 kB
  • sloc: cpp: 696; sh: 13; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 1,243 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout_spectral.R, R/layouts.R
\name{layout_spectral}
\alias{layout_spectral}
\alias{layout_with_eigen}
\alias{layout_igraph_eigen}
\title{spectral graph layouts}
\usage{
layout_with_eigen(g, type = "laplacian", ev = "smallest")

layout_igraph_eigen(g, type = "laplacian", ev = "smallest", circular)
}
\arguments{
\item{g}{igraph object}

\item{type}{matrix to be used for spectral decomposition. either 'adjacency' or 'laplacian'}

\item{ev}{eigenvectors to be used. Either 'smallest' or 'largest'.}

\item{circular}{not used}
}
\value{
matrix of xy coordinates
}
\description{
Using a set of eigenvectors of matrices associated with a graph as coordinates
}
\details{
The layout_igraph_* function should not be used directly. It is only used as an argument for plotting with 'igraph'.
'ggraph' natively supports the layout.
}
\examples{
library(igraph)

g <- sample_gnp(50, 0.2)

xy <- layout_with_eigen(g, type = "adjacency", ev = "largest")

xy <- layout_with_eigen(g, type = "adjacency", ev = "smallest")

xy <- layout_with_eigen(g, type = "laplacian", ev = "largest")

xy <- layout_with_eigen(g, type = "laplacian", ev = "smallest")
}
\author{
David Schoch
}