# 1d random geometric graphs with curved edges

I am trying to find a good way to draw a 1d random geometric graph, perhaps representing a string of cars on a road, connected in pairs when within radius 1.

One way is

RandomGraph[SpatialGraphDistribution[10, 1, 1]]


but, essentially, the problem is the edges are indistinguishable:

One solution is to have the edges curve slightly, so you can distinguish their endpoints. Is there some way to do this? Perhaps using EdgeShapeFunction?

SeedRandom[1]
RandomGraph[SpatialGraphDistribution[10, 1, 1], EdgeShapeFunction -> "CurvedArc"]


SeedRandom[1]
RandomGraph[SpatialGraphDistribution[10, 1, 1], EdgeShapeFunction -> "CurvedEdge"]


same picture

You can also use GraphLayout -> "LinearEmbedding"

SeedRandom[1]
RandomGraph[SpatialGraphDistribution[10, 1, 1], GraphLayout -> "LinearEmbedding"]


• Ok that is ideal, thank you. – apkg Apr 27 at 11:54