如何旋转igraph网络图?

编程入门 行业动态 更新时间:2024-10-27 23:18:58
本文介绍了如何旋转igraph网络图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试旋转基于R包的igraph网络图.在igraph指南中,没有足够的解释如何使用R代码

I'm trying to rotate the R package based igraph network plot. In the igraph guidebook not enough explanation how to use R code

tk_rotate(tkp.id, degree = NULL, rad = NULL)

推荐答案

根据文档,对于R包 igraph :

tk_rotate旋转图形,其参数可以以度或弧度给出.

the tk_rotate rotates the figure, its parameter can be given either in degrees or in radians.

特别值得注意的是参数 tkp.id .确保将tkplot窗口分配给该值,以便可以在函数中将其作为 tkp.id 引用.

Of particular note is the argument tkp.id. Make sure you assign the tkplot window to this value so you can reference it as the tkp.id in the function.

tkp.id 要关闭/重塑等的tkplot窗口的ID.

tkp.id The id of the tkplot window to close/reshape/etc.

以下是一个可重现的示例,演示了它的用法:

Here is a reproducible example that demonstrates it's use:

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-09-03.

Created on 2018-09-03 by the reprex package (v0.2.0).

更多推荐

如何旋转igraph网络图?

本文发布于:2023-07-18 08:25:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1142822.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网络图   igraph

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!