Reputation: 891
Is there a way to set the minimum space in between two vertices in igraph so that the vertices don't look smashed together? The graph can be as big as needed.
Upvotes: 5
Views: 2695
Reputation: 10401
There might be, but an indirect way is to minimize the vertex.size
and, if needed, vertex.label.cex
. Making your device larger should then maximize space between nodes.
ex:
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")
Upvotes: 2