File: layout_sparse_stress.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 (52 lines) | stat: -rw-r--r-- 1,314 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
48
49
50
51
52
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout_large_graphs.R, R/layouts.R
\name{layout_sparse_stress}
\alias{layout_sparse_stress}
\alias{layout_with_sparse_stress}
\alias{layout_igraph_sparse_stress}
\title{sparse stress graph layout}
\usage{
layout_with_sparse_stress(g, pivots, weights = NA, iter = 500)

layout_igraph_sparse_stress(g, pivots, weights = NA, iter = 500, circular)
}
\arguments{
\item{g}{igraph object}

\item{pivots}{number of pivots}

\item{weights}{ignored}

\item{iter}{number of iterations during stress optimization}

\item{circular}{not used}
}
\value{
matrix of xy coordinates
}
\description{
stress majorization for larger graphs based on a set of pivot nodes.
}
\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{
\dontrun{
library(igraph)
library(ggraph)

g <- sample_gnp(1000, 0.005)

ggraph(g, layout = "sparse_stress", pivots = 100) +
    geom_edge_link0(edge_colour = "grey66") +
    geom_node_point(shape = 21, fill = "grey25", size = 5) +
    theme_graph()
}
}
\references{
Ortmann, M. and Klimenta, M. and Brandes, U. (2016). A Sparse Stress Model. https://arxiv.org/pdf/1608.08909.pdf
}
\author{
David Schoch
}