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;
$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:

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

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:

I appreciate any assistance with this.
graphics graphs-and-networks
$endgroup$
add a comment |
$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:

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

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:

I appreciate any assistance with this.
graphics graphs-and-networks
$endgroup$
add a comment |
$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:

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

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:

I appreciate any assistance with this.
graphics graphs-and-networks
$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:

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

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:

I appreciate any assistance with this.
graphics graphs-and-networks
graphics graphs-and-networks
asked 9 hours ago
Luke CollinsLuke Collins
2031 silver badge7 bronze badges
2031 silver badge7 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$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]

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

$endgroup$
$begingroup$
This is beautiful!
$endgroup$
– Luke Collins
6 hours ago
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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]

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

$endgroup$
$begingroup$
This is beautiful!
$endgroup$
– Luke Collins
6 hours ago
add a comment |
$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]

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

$endgroup$
$begingroup$
This is beautiful!
$endgroup$
– Luke Collins
6 hours ago
add a comment |
$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]

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

$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]

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

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
add a comment |
$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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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