R igraph - specify the minimum space between the vertices

Is there a way to set the minimum space between two vertices in igraph so that the vertices do not look broken together? The schedule can be as large as possible.

+5
source share
1 answer

Perhaps, but indirectly, minimizing vertex.size and, if necessary, vertex.label.cex . To increase your device, increase the space between nodes.

Example:

 library(igraph) my.graph <- graph.lattice(length = c(4,4), dim = 1, directed = FALSE) plot(my.graph, layout = layout.grid, vertex.label=toupper(1:16), vertex.size = 20, vertex.shape = "square", vertex.color="white", vertex.frame.color= "black", vertex.label.color = "black", vertex.label.family = "sans", vertex.label.cex=1, edge.width=2, edge.color="black") 

enter image description here

+2
source

Source: https://habr.com/ru/post/1214866/


All Articles