[英]How to rotate igraph network plot?
我正在尝试旋转基于 R 包的 igraph 网络图。 在 igraph 指南中没有足够的解释如何使用 R 代码
tk_rotate(tkp.id, degree = NULL, rad = NULL)
根据文档,对于 R 包igraph
:
tk_rotate 旋转图形,它的参数可以以度数或弧度给出。
特别值得注意的是参数tkp.id
。 确保将 tkplot 窗口分配给此值,以便您可以在函数tkp.id
其作为tkp.id
引用。
tkp.id
要关闭/重塑/等的 tkplot 窗口的 ID。
这是一个可重现的示例,演示了它的用法:
library(igraph)
#>
#> Attaching package: 'igraph'
#> The following objects are masked from 'package:stats':
#>
#> decompose, spectrum
#> The following object is masked from 'package:base':
#>
#> union
g <- make_ring(10)
x <- tkplot(g)
tk_rotate(x, degree = NULL, rad = NULL)
由reprex 包(v0.2.0) 于 2018 年 9 月 3 日创建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.