I have a complete graph G of 214 nodes and therefore a looot of edges. In this graph I have a subset of edges that are coloured red, however almost all edges are overlapped by other edges and therefore the route is not visible. Is it possible to get the coloured edges to the front and make them visible?
and the code i used:
#G = a nx. multigraph filled with edges and nodes
for u,v,k in G.edges(keys = True):
coloured = False
for i in range(len(route)):
if i != len(route)-1:
reqU = route[i]
reqV = route[i+1]
if (u==reqU) & (v == reqV):
ec.append('r')
coloured = True
else:
reqU = route[i]
reqV = route[0]
if (u==reqU) & (v == reqV):
ec.append('r')
coloured = True
if coloured == False:
ec.append('gray')
G_projected = ox.project_graph(G)
fig, ax = ox.plot_graph(G_projected, edge_color=ec,figsize=(25,25))