|
a |
|
b/man/c_net_layout.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/3-1.layout.R |
|
|
3 |
\name{c_net_layout} |
|
|
4 |
\alias{c_net_layout} |
|
|
5 |
\alias{c_net_lay} |
|
|
6 |
\title{Layout coordinates} |
|
|
7 |
\usage{ |
|
|
8 |
c_net_layout( |
|
|
9 |
go, |
|
|
10 |
method = igraph::nicely(), |
|
|
11 |
order_by = NULL, |
|
|
12 |
order_ls = NULL, |
|
|
13 |
seed = 1234, |
|
|
14 |
line_curved = 0.5, |
|
|
15 |
rescale = TRUE, |
|
|
16 |
... |
|
|
17 |
) |
|
|
18 |
} |
|
|
19 |
\arguments{ |
|
|
20 |
\item{go}{igraph or metanet} |
|
|
21 |
|
|
|
22 |
\item{method}{(1) as_line(), as_arc(), as_polygon(), as_polyarc(), as_polycircle(), as_circle_tree(); |
|
|
23 |
(2) as_star(), as_tree(), in_circle(), nicely(), on_grid(), on_sphere(),randomly(), with_dh(), with_fr(), with_gem(), with_graphopt(), with_kk(),with_lgl(), with_mds(),. see \code{\link[igraph]{layout_}}; |
|
|
24 |
(3) a character, "auto","backbone","centrality","circlepack","dendrogram", |
|
|
25 |
"eigen","focus","hive","igraph","linear","manual","matrix", |
|
|
26 |
"partition","pmds","stress","treemap","unrooted". see \code{\link[ggraph]{create_layout}}} |
|
|
27 |
|
|
|
28 |
\item{order_by}{order nodes according to a node attribute} |
|
|
29 |
|
|
|
30 |
\item{order_ls}{manual the discrete variable with a vector, or continuous variable with "desc" to decreasing} |
|
|
31 |
|
|
|
32 |
\item{seed}{random seed} |
|
|
33 |
|
|
|
34 |
\item{line_curved}{consider line curved, only for some layout methods like as_line(), as_polygon().default:0} |
|
|
35 |
|
|
|
36 |
\item{rescale}{logical, scale the X, Y to (-1,1)} |
|
|
37 |
|
|
|
38 |
\item{...}{add} |
|
|
39 |
} |
|
|
40 |
\value{ |
|
|
41 |
coors object: coordinates for nodes, columns: name, X, Y; curved for edges, columns: from, to, curved; |
|
|
42 |
} |
|
|
43 |
\description{ |
|
|
44 |
Layout coordinates |
|
|
45 |
} |
|
|
46 |
\examples{ |
|
|
47 |
library(igraph) |
|
|
48 |
c_net_layout(co_net) -> coors |
|
|
49 |
c_net_plot(co_net, coors) |
|
|
50 |
c_net_plot(co_net, c_net_layout(co_net, in_circle()), vertex.size = 2) |
|
|
51 |
c_net_plot(co_net, c_net_layout(co_net, in_circle(), order_by = "v_class"), vertex.size = 2) |
|
|
52 |
c_net_plot(co_net, c_net_layout(co_net, in_circle(), order_by = "size", order_ls = "desc")) |
|
|
53 |
c_net_plot(co_net, c_net_layout(co_net, as_polygon(3))) |
|
|
54 |
} |
|
|
55 |
\seealso{ |
|
|
56 |
Other layout: |
|
|
57 |
\code{\link{as_arc}()}, |
|
|
58 |
\code{\link{as_circle_tree}()}, |
|
|
59 |
\code{\link{as_line}()}, |
|
|
60 |
\code{\link{as_multi_layer}()}, |
|
|
61 |
\code{\link{as_poly_sector}()}, |
|
|
62 |
\code{\link{as_polyarc}()}, |
|
|
63 |
\code{\link{as_polycircle}()}, |
|
|
64 |
\code{\link{as_polygon}()} |
|
|
65 |
} |
|
|
66 |
\concept{layout} |