ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 26 Dec 2023 11:15:44 +0100Plot a planar graph as a plane graphhttps://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/ I have a graph D which is the bipartite graph of a matrix Y. I know this graph is planar, however when I plot it using the .plot() and output it using .save() it does not plot as a plane graph. I was wondering if there was any nice way to output a graph in a planar form (namely, such that none of the edges intersect). According to this website on the plotting sage math website (can't post url since my karma is too low) there is a plot option 'layout' which seems to have the option 'planar'. I am unsure how to test this, or if this would even achieve what I'm interested in doing. Thu, 07 Dec 2023 21:15:09 +0100https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/Comment by FrédéricC for <p>I have a graph D which is the bipartite graph of a matrix Y. I know this graph is planar, however when I plot it using the .plot() and output it using .save() it does not plot as a plane graph. I was wondering if there was any nice way to output a graph in a planar form (namely, such that none of the edges intersect). According to this website on the plotting sage math website (can't post url since my karma is too low) there is a plot option 'layout' which seems to have the option 'planar'. I am unsure how to test this, or if this would even achieve what I'm interested in doing. </p>
https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=75143#post-id-75143you could try to manipulate the picture yourself using
sage: g = graphs.WheelGraph(6)
sage: g.show(method='js')Tue, 26 Dec 2023 11:15:44 +0100https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=75143#post-id-75143Comment by FrédéricC for <p>I have a graph D which is the bipartite graph of a matrix Y. I know this graph is planar, however when I plot it using the .plot() and output it using .save() it does not plot as a plane graph. I was wondering if there was any nice way to output a graph in a planar form (namely, such that none of the edges intersect). According to this website on the plotting sage math website (can't post url since my karma is too low) there is a plot option 'layout' which seems to have the option 'planar'. I am unsure how to test this, or if this would even achieve what I'm interested in doing. </p>
https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=74765#post-id-74765well, its a planar picture. That it does not please you is a matter of taste entirely.Sun, 10 Dec 2023 09:12:14 +0100https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=74765#post-id-74765Comment by wizard7703 for <p>I have a graph D which is the bipartite graph of a matrix Y. I know this graph is planar, however when I plot it using the .plot() and output it using .save() it does not plot as a plane graph. I was wondering if there was any nice way to output a graph in a planar form (namely, such that none of the edges intersect). According to this website on the plotting sage math website (can't post url since my karma is too low) there is a plot option 'layout' which seems to have the option 'planar'. I am unsure how to test this, or if this would even achieve what I'm interested in doing. </p>
https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=74760#post-id-74760yes but I am unsure how to use the 'planar' layout seems to output a graph whose vertices are not organized in any nice waySun, 10 Dec 2023 05:35:36 +0100https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=74760#post-id-74760Comment by FrédéricC for <p>I have a graph D which is the bipartite graph of a matrix Y. I know this graph is planar, however when I plot it using the .plot() and output it using .save() it does not plot as a plane graph. I was wondering if there was any nice way to output a graph in a planar form (namely, such that none of the edges intersect). According to this website on the plotting sage math website (can't post url since my karma is too low) there is a plot option 'layout' which seems to have the option 'planar'. I am unsure how to test this, or if this would even achieve what I'm interested in doing. </p>
https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=74736#post-id-74736Have you read https://doc.sagemath.org/html/en/reference/plotting/sage/graphs/graph_plot.html ?Fri, 08 Dec 2023 09:05:00 +0100https://ask.sagemath.org/question/74735/plot-a-planar-graph-as-a-plane-graph/?comment=74736#post-id-74736