This is a chord visualization taken from here. The corresponding code for visualization is
g = ExampleData[{"NetworkGraph", "LesMiserables"}, "FullGraph"] v = VertexList[g] e = EdgeList[g]; r = 10; tsep = 1.0; ang = 2 Pi/Length[v] + 0.0; gelt2 = Table[vind1 = Position[v, e[[i, 1]]][[1, 1]]; vind2 = Position[v, e[[i, 2]]][[1, 1]]; {Opacity[0.5], RGBColor[0.6, 0.729, 1], BSplineCurve[{{(r - 0.5)*Cos[ang*vind1], (r - 0.5)* Sin[ang*vind1]}, {0, 0}, {(r - 0.5)*Cos[ang*vind2], (r - 0.5)* Sin[ang*vind2]}}]}, {i, 1, Length[e]}]; gdyn = Table[cv = v[[j]]; tempe = EdgeList[g, cv \[UndirectedEdge] _]; rot = (ang*j > Pi/2) && (ang*j < 3*Pi/2); Mouseover[ (*if mouse not on top*)(*render the character name*) Rotate[Text[ Style[(*Limit the character name to 8 characters only*) If[StringLength[cv] > 8, StringTake[cv, 8] <> ".", cv], Medium], {(r + tsep)*Cos[ang*j], (r + tsep)*Sin[ang*j]}], If[rot, ang*j - Pi, ang*j]], {(*if mouse on top*)(*render the character name*) Rotate[ Text[Style[cv, Medium, Blue, Bold], {(r + tsep)*Cos[ang*j], (r + tsep)*Sin[ang*j]}], If[rot, ang*j - Pi, ang*j]],(*render thick bsplines curves*) Table[vind1 = Position[v, tempe[[i, 1]]][[1, 1]]; vind2 = Position[v, tempe[[i, 2]]][[1, 1]]; {Thick, BSplineCurve[{{(r - 0.5)*Cos[ang*vind1], (r - 0.5)* Sin[ang*vind1]}, {0, 0}, {(r - 0.5)*Cos[ang*vind2], (r - 0.5)* Sin[ang*vind2]}}]}, {i, 1, Length[tempe]}] (*end of thick b- spline table*)} (*end of Mouseover second argument*) ],(*end of Mouseover*){j, 1, Length[v]}];(*end of gdyn table*) The corresponding visualization is:
Now I wish to color each edge with two colors - the first half with one color and the second half with another color and all the edges from the same vertex should have the same color. A sample is shown below:
How can I do this?





