R语言 netplot包nplot网络关系图
做网络关系图的html版本的那个包没跟新,在R4.1已经不能用。
我看大家有发文的需求,学生和科研都有出版需求。在这儿推荐一个包做网络关系图,它出图是静态的。该包使用Grid绘图系统,也有引用ggplot2绘图,但是它没有很呆板,会兼顾美感,有提供美学参数。
# 字符编码:UTF-8
# R 版本:R x64 4.1.1 for window 11
# cgh163email@163.com
# 个人笔记不负责任,拎了个梨🍐🍈
#.rs.restartR()
require(netplot)
rm(list = ls());gc()
library(igraph)
library(netplot)
set.seed(1)
x <- sample_smallworld(1, 200, 5, 0.03)
x
plot(x) # ala igraph
dev.copy(png, "1.png");dev.off()
nplot(x) # ala netplot
dev.copy(png, "2.png");dev.off()
#end Fri Aug 27 16:25:51 2021 --


网友评论