library(igraph)
notable_graph <- c("Bull", "Chvatal", "Coxeter", "Cubical", "Diamond", "Dodecahedral", "Dodecahedron", 
                   "Folkman", "Franklin", "Frucht", "Grotzsch", "Heawood", "Herschel", "House", 
                   "HouseX", "Icosahedral", "Icosahedron", "Krackhardt kite", "Levi", "McGee", 
                   "Meredith", "Noperfectmatching", "Nonline", "Octahedral", "Octahedron", 
                   "Petersen", "Robertson", "Smallestcyclicgroup", "Tetrahedral", "Tetrahedron", 
                   "Thomassen", "Tutte", "Uniquely3colorable", "Walther", "Zachary")

graph <- lapply(notable_graph,make_graph)

make_graph() 一共支持 35 个内置图形。

par(mfrow=c(5,7))

success <- lapply(notable_graph, function(x){
  graph <- make_graph(x)
  par(mar=c(1,1,1,1))
  plot(graph, main = x)
})
make_star(10) %>% plot
make_de_bruijn_graph(3,4) %>% plot
make_full_graph(10) %>% plot
make_kautz_graph(3,4) %>% plot

作者简介

Chun-Hui Gao is a Research Associate at Huazhong Agricultural University.

重复使用

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The source code is licensed under MIT. The full source is available at https://github.com/yihui/hugo-prose.

欢迎修订

如果您发现本文里含有任何错误(包括错别字和标点符号),欢迎在本站的 GitHub 项目里提交修订意见。

引用本文

如果您使用了本文的内容,请按照以下方式引用:

gaoch (2020). igraph: 生成网络. BIO-SPRING. /post/2020/02/26/igraph-make-graph/

BibTeX citation

@misc{
  title = "igraph: 生成网络",
  author = "gaoch",
  year = "2020",
  journal = "BIO-SPRING",
  note = "/post/2020/02/26/igraph-make-graph/"
}