How can I get edges to bend to avoid crossing?Reduce distances between vertices of graph to minimum possible?Edges and crossingDynamic Graph visualizationConverting expressions to “edges” for use in TreePlot, GraphGraph plotting: specify layers for layered drawingVertexRenderingFunction (or EdgeRenderingFunction) with movable nodes?How to set the Y coordinates for a Graph with defined X coordinates to prevent overlap of nodes?Better control of vertex positions in GraphPlot?How can I route edges manually for a Graph?Layered Graph Drawing: Specify Layer for Nodes

What is the line crossing the Pacific Ocean that is shown on maps?

Why are 120 V general receptacle circuits limited to 20 A?

In F1 classification, what is ON?

What is the consensus on handling pagination in 2019 on big result sets?

In which public key encryption algorithms are the private and public key not reversible?

Why was Mal so quick to drop Bester in favour of Kaylee?

I hit a pipe with a mower and now it won't turn

What is the difference between x RadToDeg cos x div and COSC?

What's the safest way to inform a new user of their password on my web site?

Who gets an Apparition licence?

Are these intended activities legal to do in the USA under the VWP?

Can a US President have someone sent to prison?

Loss of majority in Westminster

Why does a brace command group need spaces after the opening brace in POSIX Shell Grammar?

How is this practical and ancient scene shot?

Can a single server be associated with multiple domains?

How can I get edges to bend to avoid crossing?

Do I have to roll to maintain concentration if a target other than me who is affected by my concentration spell takes damage?

How would an order of Monks that renounce their names communicate effectively?

Different budgets within roommate group

The difference between Rad1 and Rfd1

What does Mildred mean by this line in Three Billboards Outside Ebbing, Missouri?

Are metaheuristics ever practical for continuous optimization?

Why transcripts instead of degree certificates?



How can I get edges to bend to avoid crossing?


Reduce distances between vertices of graph to minimum possible?Edges and crossingDynamic Graph visualizationConverting expressions to “edges” for use in TreePlot, GraphGraph plotting: specify layers for layered drawingVertexRenderingFunction (or EdgeRenderingFunction) with movable nodes?How to set the Y coordinates for a Graph with defined X coordinates to prevent overlap of nodes?Better control of vertex positions in GraphPlot?How can I route edges manually for a Graph?Layered Graph Drawing: Specify Layer for Nodes






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3












$begingroup$


I want to generate a layered drawing of the Hoffman–Singlelton graph. As an example of what I want, here is a layered drawing of the Petersen graph:



enter image description here



Now if I right click on the output of PetersenGraph[] and do Graph Layout -> Layered, drawing, I get this:



enter image description here



Clearly a lot of the important visual information at the end layer is lost because the edges all overlap. Is there a way to recreate something similar to the the top image, where the edges at the last layer are visible?



My actual goal is not to do this with the Petersen, but with the Hoffman–Singleton (in Mathematica, FromEntity[Entity["Graph", "HoffmanSingletonGraph"]]). Needless to say, I got a similar output for this graph:



enter image description here



I appreciate any assistance with this.










share|improve this question









$endgroup$


















    3












    $begingroup$


    I want to generate a layered drawing of the Hoffman–Singlelton graph. As an example of what I want, here is a layered drawing of the Petersen graph:



    enter image description here



    Now if I right click on the output of PetersenGraph[] and do Graph Layout -> Layered, drawing, I get this:



    enter image description here



    Clearly a lot of the important visual information at the end layer is lost because the edges all overlap. Is there a way to recreate something similar to the the top image, where the edges at the last layer are visible?



    My actual goal is not to do this with the Petersen, but with the Hoffman–Singleton (in Mathematica, FromEntity[Entity["Graph", "HoffmanSingletonGraph"]]). Needless to say, I got a similar output for this graph:



    enter image description here



    I appreciate any assistance with this.










    share|improve this question









    $endgroup$














      3












      3








      3





      $begingroup$


      I want to generate a layered drawing of the Hoffman–Singlelton graph. As an example of what I want, here is a layered drawing of the Petersen graph:



      enter image description here



      Now if I right click on the output of PetersenGraph[] and do Graph Layout -> Layered, drawing, I get this:



      enter image description here



      Clearly a lot of the important visual information at the end layer is lost because the edges all overlap. Is there a way to recreate something similar to the the top image, where the edges at the last layer are visible?



      My actual goal is not to do this with the Petersen, but with the Hoffman–Singleton (in Mathematica, FromEntity[Entity["Graph", "HoffmanSingletonGraph"]]). Needless to say, I got a similar output for this graph:



      enter image description here



      I appreciate any assistance with this.










      share|improve this question









      $endgroup$




      I want to generate a layered drawing of the Hoffman–Singlelton graph. As an example of what I want, here is a layered drawing of the Petersen graph:



      enter image description here



      Now if I right click on the output of PetersenGraph[] and do Graph Layout -> Layered, drawing, I get this:



      enter image description here



      Clearly a lot of the important visual information at the end layer is lost because the edges all overlap. Is there a way to recreate something similar to the the top image, where the edges at the last layer are visible?



      My actual goal is not to do this with the Petersen, but with the Hoffman–Singleton (in Mathematica, FromEntity[Entity["Graph", "HoffmanSingletonGraph"]]). Needless to say, I got a similar output for this graph:



      enter image description here



      I appreciate any assistance with this.







      graphics graphs-and-networks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 9 hours ago









      Luke CollinsLuke Collins

      2031 silver badge7 bronze badges




      2031 silver badge7 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          6












          $begingroup$

          Here's the one way by using the custom edge function:



          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1>y2:=arcRight[b, a];
          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1<=y2:=BSplineCurve[a, x1 + (y2-y1).7, (y1+y2)/2,b]

          iLayeredDrawing[g_, spos_Integer:1, opt___?OptionQ] :=
          Module[s, vlist, leaves,
          vlist = VertexList[g];
          s = vlist[[spos]];
          leaves = MaximalBy[Reap[BreadthFirstScan[g, s, "DiscoverVertex"->(Sow[#1,#3]&)]][[2,1]], Last][[All,1]];
          Graph[vlist, EdgeList[g],
          opt, GraphLayout->"LayeredEmbedding", "Orientation"->Left, "LeafDistance"->1/(Length[leaves]/2), "RootVertex" -> s, EdgeShapeFunction->a_[UndirectedEdge]b_/;SubsetQ[leaves,a,b]:>(arcRight[#1]&)]
          ]


          For example,



          iLayeredDrawing[PetersenGraph[], EdgeStyle -> Black, 
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .3]


          enter image description here



          iLayeredDrawing[FromEntity[Entity["Graph", "HoffmanSingletonGraph"]], 
          EdgeStyle -> Black,
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .6,
          ImageSize -> 600]


          enter image description here






          share|improve this answer









          $endgroup$












          • $begingroup$
            This is beautiful!
            $endgroup$
            – Luke Collins
            6 hours ago













          Your Answer








          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%2f200931%2fhow-can-i-get-edges-to-bend-to-avoid-crossing%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









          6












          $begingroup$

          Here's the one way by using the custom edge function:



          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1>y2:=arcRight[b, a];
          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1<=y2:=BSplineCurve[a, x1 + (y2-y1).7, (y1+y2)/2,b]

          iLayeredDrawing[g_, spos_Integer:1, opt___?OptionQ] :=
          Module[s, vlist, leaves,
          vlist = VertexList[g];
          s = vlist[[spos]];
          leaves = MaximalBy[Reap[BreadthFirstScan[g, s, "DiscoverVertex"->(Sow[#1,#3]&)]][[2,1]], Last][[All,1]];
          Graph[vlist, EdgeList[g],
          opt, GraphLayout->"LayeredEmbedding", "Orientation"->Left, "LeafDistance"->1/(Length[leaves]/2), "RootVertex" -> s, EdgeShapeFunction->a_[UndirectedEdge]b_/;SubsetQ[leaves,a,b]:>(arcRight[#1]&)]
          ]


          For example,



          iLayeredDrawing[PetersenGraph[], EdgeStyle -> Black, 
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .3]


          enter image description here



          iLayeredDrawing[FromEntity[Entity["Graph", "HoffmanSingletonGraph"]], 
          EdgeStyle -> Black,
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .6,
          ImageSize -> 600]


          enter image description here






          share|improve this answer









          $endgroup$












          • $begingroup$
            This is beautiful!
            $endgroup$
            – Luke Collins
            6 hours ago















          6












          $begingroup$

          Here's the one way by using the custom edge function:



          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1>y2:=arcRight[b, a];
          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1<=y2:=BSplineCurve[a, x1 + (y2-y1).7, (y1+y2)/2,b]

          iLayeredDrawing[g_, spos_Integer:1, opt___?OptionQ] :=
          Module[s, vlist, leaves,
          vlist = VertexList[g];
          s = vlist[[spos]];
          leaves = MaximalBy[Reap[BreadthFirstScan[g, s, "DiscoverVertex"->(Sow[#1,#3]&)]][[2,1]], Last][[All,1]];
          Graph[vlist, EdgeList[g],
          opt, GraphLayout->"LayeredEmbedding", "Orientation"->Left, "LeafDistance"->1/(Length[leaves]/2), "RootVertex" -> s, EdgeShapeFunction->a_[UndirectedEdge]b_/;SubsetQ[leaves,a,b]:>(arcRight[#1]&)]
          ]


          For example,



          iLayeredDrawing[PetersenGraph[], EdgeStyle -> Black, 
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .3]


          enter image description here



          iLayeredDrawing[FromEntity[Entity["Graph", "HoffmanSingletonGraph"]], 
          EdgeStyle -> Black,
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .6,
          ImageSize -> 600]


          enter image description here






          share|improve this answer









          $endgroup$












          • $begingroup$
            This is beautiful!
            $endgroup$
            – Luke Collins
            6 hours ago













          6












          6








          6





          $begingroup$

          Here's the one way by using the custom edge function:



          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1>y2:=arcRight[b, a];
          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1<=y2:=BSplineCurve[a, x1 + (y2-y1).7, (y1+y2)/2,b]

          iLayeredDrawing[g_, spos_Integer:1, opt___?OptionQ] :=
          Module[s, vlist, leaves,
          vlist = VertexList[g];
          s = vlist[[spos]];
          leaves = MaximalBy[Reap[BreadthFirstScan[g, s, "DiscoverVertex"->(Sow[#1,#3]&)]][[2,1]], Last][[All,1]];
          Graph[vlist, EdgeList[g],
          opt, GraphLayout->"LayeredEmbedding", "Orientation"->Left, "LeafDistance"->1/(Length[leaves]/2), "RootVertex" -> s, EdgeShapeFunction->a_[UndirectedEdge]b_/;SubsetQ[leaves,a,b]:>(arcRight[#1]&)]
          ]


          For example,



          iLayeredDrawing[PetersenGraph[], EdgeStyle -> Black, 
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .3]


          enter image description here



          iLayeredDrawing[FromEntity[Entity["Graph", "HoffmanSingletonGraph"]], 
          EdgeStyle -> Black,
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .6,
          ImageSize -> 600]


          enter image description here






          share|improve this answer









          $endgroup$



          Here's the one way by using the custom edge function:



          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1>y2:=arcRight[b, a];
          arcRight[a:x1_,y1_,___,b:x2_,y2_]/;y1<=y2:=BSplineCurve[a, x1 + (y2-y1).7, (y1+y2)/2,b]

          iLayeredDrawing[g_, spos_Integer:1, opt___?OptionQ] :=
          Module[s, vlist, leaves,
          vlist = VertexList[g];
          s = vlist[[spos]];
          leaves = MaximalBy[Reap[BreadthFirstScan[g, s, "DiscoverVertex"->(Sow[#1,#3]&)]][[2,1]], Last][[All,1]];
          Graph[vlist, EdgeList[g],
          opt, GraphLayout->"LayeredEmbedding", "Orientation"->Left, "LeafDistance"->1/(Length[leaves]/2), "RootVertex" -> s, EdgeShapeFunction->a_[UndirectedEdge]b_/;SubsetQ[leaves,a,b]:>(arcRight[#1]&)]
          ]


          For example,



          iLayeredDrawing[PetersenGraph[], EdgeStyle -> Black, 
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .3]


          enter image description here



          iLayeredDrawing[FromEntity[Entity["Graph", "HoffmanSingletonGraph"]], 
          EdgeStyle -> Black,
          VertexStyle -> Directive[White, EdgeForm[Black]], VertexSize -> .6,
          ImageSize -> 600]


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 6 hours ago









          halmirhalmir

          11k27 silver badges45 bronze badges




          11k27 silver badges45 bronze badges











          • $begingroup$
            This is beautiful!
            $endgroup$
            – Luke Collins
            6 hours ago
















          • $begingroup$
            This is beautiful!
            $endgroup$
            – Luke Collins
            6 hours ago















          $begingroup$
          This is beautiful!
          $endgroup$
          – Luke Collins
          6 hours ago




          $begingroup$
          This is beautiful!
          $endgroup$
          – Luke Collins
          6 hours ago

















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f200931%2fhow-can-i-get-edges-to-bend-to-avoid-crossing%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

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480