user3599127
user3599127

Reputation: 31

igraph - multiple lines of text in one circle?

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:

enter image description here

Upvotes: 1

Views: 1860

Answers (1)

thelatemail
thelatemail

Reputation: 93938

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)

enter image description here

Upvotes: 11

Related Questions