问题
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