# How to change order that graph edges are drawn

I have a network graph in which the edge color is proportional to the edge weight. Edges with a low weight value appear almost white. I would like the edges to be drawn such that those with a higher weight are drawn last. This will minimize light edges crossing over darker ones, and make the graph look nicer.

As far as I can tell, there is no way to specify the order that edges are drawn. The only thing that changes the order that edges are drawn in is the vertex order. Here is a toy example (without weighted edges to make it simple):

compGr = CompleteGraph;
cV = VertexList[compGr];
cE = EdgeList[compGr];

cEcolor =
Transpose[{cE, {Gray, Lighter[Yellow, 0.6], Black, Gray, Gray,
Darker[Green, 0.5], Darker[Red, 0.5], Gray, Lighter[Blue, 0.95],
Gray}}];
eProp = (#[] -> {EdgeStyle ->  {#[], Thickness[0.02],
Opacity}}) & /@ cEcolor;

Grid[{{"Base", "Reversed Vertex Order",
"Reverse Edge Order"}, {compGr1 =
Graph[cV, cE, Properties -> eProp],
compGr1 = Graph[Reverse[cV], cE, Properties -> eProp],
compGr1 = Graph[cV, Reverse[cE], Properties -> eProp]}}]


Ideally, I want to plot edges with the lightest (lowest edge weight) edges appearing underneath the darker edges (highest edge weight). I have tried specifying the edges and their properties sorted in the order to be drawn without success. Since my vertices have multiple edges, with varying edge weights, sorting the vertices would not give the proper order.

The ideal solution would let me specify the order in which edges are drawn.

You can use GraphLayout -> {"RenderingOrder" -> ...} option:
Graph[cV, cE, Properties -> eProp,