igraph - multiple lines of text in one circle?

时光怂恿深爱的人放手 提交于 2019-12-24 13:50:35

问题


I am a complete beginner to igraph so please be easy on me. I am creating a network map and would like to add additional lines of text for each circle. How may I do that? Is it possible? Here is an illustration:


回答1:


You can specify a line break in a character vector using \n, which allows you to force multiple lines of text in a single vertex.

library(igraph)
g <- graph.data.frame(data.frame(A=1,B=2))
V(g)$name <- c("Line 1\nLine 2","Point 2")
plot(g,vertex.size=100)



来源:https://stackoverflow.com/questions/23463696/igraph-multiple-lines-of-text-in-one-circle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!