File: draw_circle.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 (38 lines) | stat: -rw-r--r-- 905 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annotate_functions.R
\name{draw_circle}
\alias{draw_circle}
\title{Draw concentric circles}
\usage{
draw_circle(col = "#00BFFF", use = "focus", max.circle)
}
\arguments{
\item{col}{color of circles}

\item{use}{one of 'focus' or 'cent'}

\item{max.circle}{if use = 'focus' specifies the number of circles to draw}
}
\value{
concentric circles around origin
}
\description{
Draw concentric circles
}
\details{
this function is best used with a concentric layout such as \link{layout_with_focus} and \link{layout_with_centrality}.
}
\examples{
library(igraph)
g <- sample_gnp(10, 0.4)

\dontrun{
library(ggraph)
ggraph(g, layout = "centrality", centrality = degree(g)) +
    draw_circle(use = "cent") +
    geom_edge_link() +
    geom_node_point(shape = 21, fill = "grey25", size = 5) +
    theme_graph() +
    coord_fixed()
}
}