# Set minimum edge separation for SpringElectricalEmbedding

I have a graph with nodes that themselves are images of graphs. When there are many nodes in the graph the nodes are placed too close to one another and so the images overlap, preventing the edges from being seen.

I would like to set some minimum separation between nodes so that this stops happening. I have attempted to alter the SpringElectricalEmbedding's options, such as changing "RepulsiveForcePower", but to no avail.

The code I am using is the following, with NodeGraphImgs providing the node images and edges the graph's structure:

Graph[edges[[;; , 1]],
VertexShape -> NodeGraphImgs,
VertexSize -> Scaled[{0.12, 0.12}],
VertexLabels -> None,
EdgeStyle -> Thick,
AspectRatio -> 1,
GraphLayout -> {"SpringElectricalEmbedding",
"RepulsiveForcePower" -> -1},
ImageSize -> Full];


For example, below is a graph with the correct output:

however if many nodes are in the graph, the output becomes indecipherable:

If this is not possible, an alternative solution would be a way to increase the space in which the graph is draw, such that nodes are able to be placed further away. But I do not know how to do this consistently either.

• You could decrease the vertex sizes and increase the image size. VertexSize is, by default, interpreted as a fraction of the shortest edge length. – Szabolcs Jun 13 '18 at 17:53