How to color each edge of a graph with two colors?












8














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:



enter image description here



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:



enter image description here



How can I do this?










share|improve this question





























    8














    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:



    enter image description here



    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:



    enter image description here



    How can I do this?










    share|improve this question



























      8












      8








      8


      3





      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:



      enter image description here



      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:



      enter image description here



      How can I do this?










      share|improve this question















      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:



      enter image description here



      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:



      enter image description here



      How can I do this?







      graphs-and-networks






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 25 at 11:20

























      asked Dec 24 at 16:48









      Majis

      1,425414




      1,425414






















          1 Answer
          1






          active

          oldest

          votes


















          13














          Update: You can also use custom functions for the options EdgeShapeFunction and VertexShapeFunction:



          ClearAll[eSf, vSf]
          eSf[g_, cols_] := Module[{bsf = BSplineFunction[{#[[1]],
          RegionNearest[Disk[Mean[#[[{1, -1}]]], Norm[#[[1]] - #[[-1]]]], {0, 0}], #[[-1]]}],
          p1 = Subdivide[0, 1/2, 50], p2 = Subdivide[1/2, 1, 50]},
          {Thin, cols[[VertexIndex[g, #2[[1]]]]], Line[bsf /@ p1],
          cols[[VertexIndex[g, #2[[2]]]]], Line[bsf /@ p2]}] &;
          vSf[g_, cols_] := Module[{off = If[-Pi/2 < ArcTan @@ # < Pi/2, Left, Right]},
          {cols[[VertexIndex[g, #2]]],
          Text[Style[Framed[#2, FrameStyle -> None], FontSize -> Scaled[.03]],
          #, {off, Center}, ArcTan[#] (off /. {Left -> 1, Right -> -1})],
          PointSize[Large], Point @ #}] &;


          Example:



          g = ExampleData[{"NetworkGraph", "LesMiserables"}, "FullGraph"];
          cols = RandomSample[ColorData[{"Rainbow", {1, VertexCount@g}}] /@ Range[VertexCount[g]]];

          SetProperty[g, {ImageSize -> Large, GraphLayout -> "CircularEmbedding",
          VertexShapeFunction -> vSf[g, cols], EdgeShapeFunction -> eSf[g, cols]}]


          enter image description here



          You can add Epilog -> Circle in the second argument of SetProperty above to get:



          enter image description here



          Original answer:



          You can use BSplineFunction:



          cps1 = {{8, 5}, {0, 0}, {10, 1}};
          Graphics[{Thick, Red, Line[BSplineFunction[cps1] /@ Subdivide[0, 1/2, 50]],
          Blue, Line[BSplineFunction[cps1] /@ Subdivide[1/2, 1, 50]]}]


          enter image description here






          share|improve this answer























          • The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
            – Majis
            Dec 25 at 11:19






          • 1




            @Majis, please see the update.
            – kglr
            Dec 25 at 11:32










          • I like the first one.
            – Majis
            Dec 25 at 12:07











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "387"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f188384%2fhow-to-color-each-edge-of-a-graph-with-two-colors%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          13














          Update: You can also use custom functions for the options EdgeShapeFunction and VertexShapeFunction:



          ClearAll[eSf, vSf]
          eSf[g_, cols_] := Module[{bsf = BSplineFunction[{#[[1]],
          RegionNearest[Disk[Mean[#[[{1, -1}]]], Norm[#[[1]] - #[[-1]]]], {0, 0}], #[[-1]]}],
          p1 = Subdivide[0, 1/2, 50], p2 = Subdivide[1/2, 1, 50]},
          {Thin, cols[[VertexIndex[g, #2[[1]]]]], Line[bsf /@ p1],
          cols[[VertexIndex[g, #2[[2]]]]], Line[bsf /@ p2]}] &;
          vSf[g_, cols_] := Module[{off = If[-Pi/2 < ArcTan @@ # < Pi/2, Left, Right]},
          {cols[[VertexIndex[g, #2]]],
          Text[Style[Framed[#2, FrameStyle -> None], FontSize -> Scaled[.03]],
          #, {off, Center}, ArcTan[#] (off /. {Left -> 1, Right -> -1})],
          PointSize[Large], Point @ #}] &;


          Example:



          g = ExampleData[{"NetworkGraph", "LesMiserables"}, "FullGraph"];
          cols = RandomSample[ColorData[{"Rainbow", {1, VertexCount@g}}] /@ Range[VertexCount[g]]];

          SetProperty[g, {ImageSize -> Large, GraphLayout -> "CircularEmbedding",
          VertexShapeFunction -> vSf[g, cols], EdgeShapeFunction -> eSf[g, cols]}]


          enter image description here



          You can add Epilog -> Circle in the second argument of SetProperty above to get:



          enter image description here



          Original answer:



          You can use BSplineFunction:



          cps1 = {{8, 5}, {0, 0}, {10, 1}};
          Graphics[{Thick, Red, Line[BSplineFunction[cps1] /@ Subdivide[0, 1/2, 50]],
          Blue, Line[BSplineFunction[cps1] /@ Subdivide[1/2, 1, 50]]}]


          enter image description here






          share|improve this answer























          • The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
            – Majis
            Dec 25 at 11:19






          • 1




            @Majis, please see the update.
            – kglr
            Dec 25 at 11:32










          • I like the first one.
            – Majis
            Dec 25 at 12:07
















          13














          Update: You can also use custom functions for the options EdgeShapeFunction and VertexShapeFunction:



          ClearAll[eSf, vSf]
          eSf[g_, cols_] := Module[{bsf = BSplineFunction[{#[[1]],
          RegionNearest[Disk[Mean[#[[{1, -1}]]], Norm[#[[1]] - #[[-1]]]], {0, 0}], #[[-1]]}],
          p1 = Subdivide[0, 1/2, 50], p2 = Subdivide[1/2, 1, 50]},
          {Thin, cols[[VertexIndex[g, #2[[1]]]]], Line[bsf /@ p1],
          cols[[VertexIndex[g, #2[[2]]]]], Line[bsf /@ p2]}] &;
          vSf[g_, cols_] := Module[{off = If[-Pi/2 < ArcTan @@ # < Pi/2, Left, Right]},
          {cols[[VertexIndex[g, #2]]],
          Text[Style[Framed[#2, FrameStyle -> None], FontSize -> Scaled[.03]],
          #, {off, Center}, ArcTan[#] (off /. {Left -> 1, Right -> -1})],
          PointSize[Large], Point @ #}] &;


          Example:



          g = ExampleData[{"NetworkGraph", "LesMiserables"}, "FullGraph"];
          cols = RandomSample[ColorData[{"Rainbow", {1, VertexCount@g}}] /@ Range[VertexCount[g]]];

          SetProperty[g, {ImageSize -> Large, GraphLayout -> "CircularEmbedding",
          VertexShapeFunction -> vSf[g, cols], EdgeShapeFunction -> eSf[g, cols]}]


          enter image description here



          You can add Epilog -> Circle in the second argument of SetProperty above to get:



          enter image description here



          Original answer:



          You can use BSplineFunction:



          cps1 = {{8, 5}, {0, 0}, {10, 1}};
          Graphics[{Thick, Red, Line[BSplineFunction[cps1] /@ Subdivide[0, 1/2, 50]],
          Blue, Line[BSplineFunction[cps1] /@ Subdivide[1/2, 1, 50]]}]


          enter image description here






          share|improve this answer























          • The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
            – Majis
            Dec 25 at 11:19






          • 1




            @Majis, please see the update.
            – kglr
            Dec 25 at 11:32










          • I like the first one.
            – Majis
            Dec 25 at 12:07














          13












          13








          13






          Update: You can also use custom functions for the options EdgeShapeFunction and VertexShapeFunction:



          ClearAll[eSf, vSf]
          eSf[g_, cols_] := Module[{bsf = BSplineFunction[{#[[1]],
          RegionNearest[Disk[Mean[#[[{1, -1}]]], Norm[#[[1]] - #[[-1]]]], {0, 0}], #[[-1]]}],
          p1 = Subdivide[0, 1/2, 50], p2 = Subdivide[1/2, 1, 50]},
          {Thin, cols[[VertexIndex[g, #2[[1]]]]], Line[bsf /@ p1],
          cols[[VertexIndex[g, #2[[2]]]]], Line[bsf /@ p2]}] &;
          vSf[g_, cols_] := Module[{off = If[-Pi/2 < ArcTan @@ # < Pi/2, Left, Right]},
          {cols[[VertexIndex[g, #2]]],
          Text[Style[Framed[#2, FrameStyle -> None], FontSize -> Scaled[.03]],
          #, {off, Center}, ArcTan[#] (off /. {Left -> 1, Right -> -1})],
          PointSize[Large], Point @ #}] &;


          Example:



          g = ExampleData[{"NetworkGraph", "LesMiserables"}, "FullGraph"];
          cols = RandomSample[ColorData[{"Rainbow", {1, VertexCount@g}}] /@ Range[VertexCount[g]]];

          SetProperty[g, {ImageSize -> Large, GraphLayout -> "CircularEmbedding",
          VertexShapeFunction -> vSf[g, cols], EdgeShapeFunction -> eSf[g, cols]}]


          enter image description here



          You can add Epilog -> Circle in the second argument of SetProperty above to get:



          enter image description here



          Original answer:



          You can use BSplineFunction:



          cps1 = {{8, 5}, {0, 0}, {10, 1}};
          Graphics[{Thick, Red, Line[BSplineFunction[cps1] /@ Subdivide[0, 1/2, 50]],
          Blue, Line[BSplineFunction[cps1] /@ Subdivide[1/2, 1, 50]]}]


          enter image description here






          share|improve this answer














          Update: You can also use custom functions for the options EdgeShapeFunction and VertexShapeFunction:



          ClearAll[eSf, vSf]
          eSf[g_, cols_] := Module[{bsf = BSplineFunction[{#[[1]],
          RegionNearest[Disk[Mean[#[[{1, -1}]]], Norm[#[[1]] - #[[-1]]]], {0, 0}], #[[-1]]}],
          p1 = Subdivide[0, 1/2, 50], p2 = Subdivide[1/2, 1, 50]},
          {Thin, cols[[VertexIndex[g, #2[[1]]]]], Line[bsf /@ p1],
          cols[[VertexIndex[g, #2[[2]]]]], Line[bsf /@ p2]}] &;
          vSf[g_, cols_] := Module[{off = If[-Pi/2 < ArcTan @@ # < Pi/2, Left, Right]},
          {cols[[VertexIndex[g, #2]]],
          Text[Style[Framed[#2, FrameStyle -> None], FontSize -> Scaled[.03]],
          #, {off, Center}, ArcTan[#] (off /. {Left -> 1, Right -> -1})],
          PointSize[Large], Point @ #}] &;


          Example:



          g = ExampleData[{"NetworkGraph", "LesMiserables"}, "FullGraph"];
          cols = RandomSample[ColorData[{"Rainbow", {1, VertexCount@g}}] /@ Range[VertexCount[g]]];

          SetProperty[g, {ImageSize -> Large, GraphLayout -> "CircularEmbedding",
          VertexShapeFunction -> vSf[g, cols], EdgeShapeFunction -> eSf[g, cols]}]


          enter image description here



          You can add Epilog -> Circle in the second argument of SetProperty above to get:



          enter image description here



          Original answer:



          You can use BSplineFunction:



          cps1 = {{8, 5}, {0, 0}, {10, 1}};
          Graphics[{Thick, Red, Line[BSplineFunction[cps1] /@ Subdivide[0, 1/2, 50]],
          Blue, Line[BSplineFunction[cps1] /@ Subdivide[1/2, 1, 50]]}]


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 25 at 11:38

























          answered Dec 24 at 19:33









          kglr

          176k9198404




          176k9198404












          • The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
            – Majis
            Dec 25 at 11:19






          • 1




            @Majis, please see the update.
            – kglr
            Dec 25 at 11:32










          • I like the first one.
            – Majis
            Dec 25 at 12:07


















          • The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
            – Majis
            Dec 25 at 11:19






          • 1




            @Majis, please see the update.
            – kglr
            Dec 25 at 11:32










          • I like the first one.
            – Majis
            Dec 25 at 12:07
















          The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
          – Majis
          Dec 25 at 11:19




          The visualization looks much better now with the chords of different sizes. The answer is already acceptable to me. However, since you have answered it, I feel a bit greedy. You have already removed the circular outline which is great. Can you please put a colored dot at each end as updated in my question?
          – Majis
          Dec 25 at 11:19




          1




          1




          @Majis, please see the update.
          – kglr
          Dec 25 at 11:32




          @Majis, please see the update.
          – kglr
          Dec 25 at 11:32












          I like the first one.
          – Majis
          Dec 25 at 12:07




          I like the first one.
          – Majis
          Dec 25 at 12:07


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematica Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f188384%2fhow-to-color-each-edge-of-a-graph-with-two-colors%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          數位音樂下載

          When can things happen in Etherscan, such as the picture below?

          格利澤436b