Update: In recent versions, vertices render on top. The rendering order can be controlled as follows:
testadj = RandomVariate[BernoulliDistribution[0.15], {50, 50}];
AdjacencyGraph[testadj, VertexSize -> Large,
GraphLayout -> {"RenderingOrder" -> #},
ImageSize -> Medium] & /@ {"EdgeFirst", "VertexFirst"}
This is a nasty hack. It might be the quickest workaround until you find a solution.
testadj = RandomVariate[BernoulliDistribution[0.15], {50, 50}];
gr = AdjacencyGraph[testadj, VertexSize -> Large]
Show[gr, SetProperty[gr, EdgeShapeFunction -> ({} &)]]
The end result is a Graphics
object, not a Graph
. I am using {}
as a "neutral graphics object", something that is accepted inside Graphics
, but does not render.
Unfortunately the analogous SetProperty[gr, VertexShapeFunction -> ({} &)]
does not seem to work, and I don't understand why. It may have to do something with the fact that the system analyses the vertex shape to make the edges join up nicely to them. If you need to make them disappear, you can use SetProperty[gr, VertexShape -> None]
.
Graphics
(notGraph
) object that has the vertices on top? $\endgroup$