File: curve_multiple.Rd

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (50 lines) | stat: -rw-r--r-- 1,359 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.common.R
\name{curve_multiple}
\alias{curve_multiple}
\title{Optimal edge curvature when plotting graphs}
\usage{
curve_multiple(graph, start = 0.5)
}
\arguments{
\item{graph}{The input graph.}

\item{start}{The curvature at the two extreme edges. All edges will have a
curvature between \code{-start} and \code{start}, spaced equally.}
}
\value{
A numeric vector, its length is the number of edges in the graph.
}
\description{
If graphs have multiple edges, then drawing them as straight lines does not
show them when plotting the graphs; they will be on top of each other. One
solution is to bend the edges, with diffenent curvature, so that all of them
are visible.
}
\details{
\code{curve_multiple()} calculates the optimal \code{edge.curved} vector for
plotting a graph with multiple edges, so that all edges are visible.
}
\examples{

g <- make_graph(c(
  0, 1, 1, 0, 1, 2, 1, 3, 1, 3, 1, 3,
  2, 3, 2, 3, 2, 3, 2, 3, 0, 1
) + 1)

curve_multiple(g)

set.seed(42)
plot(g)

}
\seealso{
\link{igraph.plotting} for all plotting parameters,
\code{\link[=plot.igraph]{plot.igraph()}}, \code{\link[=tkplot]{tkplot()}} and \code{\link[=rglplot]{rglplot()}}
for plotting functions.
}
\author{
Gabor Csardi \email{csardi.gabor@gmail.com}
}
\concept{plot.common}
\keyword{graphs}