Digraphs
Digraphs copied to clipboard
Write a default "edge colours" function
At present it's possible to do things like DotEdgeColoredDigraph where the second argument is the list of colours. I often find this second argument more or less difficult to propagate, it'd be good to have a function something like:
EdgeColors := function(D)
local colors, result, nbs;
colors := ["#00ff00",
"#ff00ff",
"#007fff",
"#ff7f00",
"#7fbf7f",
"#600aa0",
"#b20505",
"#b16efe",
"#397807",
"#dbfe01",
"#00ffff",
"#0b6782",
"#00ff7f",
"#fc4789"];
result := [];
for nbs in OutNeighbours(D) do
Add(result, colors{[1 .. Length(nbs)]});
od;
return result;
end;
that populates the edge colours with something more (or less) sensible.