Plot a planar graph as a plane graph

asked 2023-12-07 21:15:09 +0200

wizard7703 gravatar image

updated 2023-12-08 03:14:11 +0200

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.

edit retag flag offensive close merge delete


FrédéricC gravatar imageFrédéricC ( 2023-12-08 09:05:00 +0200 )edit

yes but I am unsure how to use the 'planar' layout seems to output a graph whose vertices are not organized in any nice way

wizard7703 gravatar imagewizard7703 ( 2023-12-10 05:35:36 +0200 )edit

well, its a planar picture. That it does not please you is a matter of taste entirely.

FrédéricC gravatar imageFrédéricC ( 2023-12-10 09:12:14 +0200 )edit

you could try to manipulate the picture yourself using

sage: g = graphs.WheelGraph(6)
FrédéricC gravatar imageFrédéricC ( 2023-12-26 11:15:44 +0200 )edit