0

I am trying to plot a directed planar graph in Maple but the command only accepts undirected graphs. The documentation does not mention this restriction. Is there a way to plot them in maple?

A small working example:

restart:
with(GraphTheory):
G:=Graph({{1,2},{2,3},{3,4}});
DrawPlanar(G);

This works but defines an undirected graph. By changing the {1,2} to [1,2], the edge is made directional and the DrawPlanar fails. Does anyone know how to create a planar plot of a directed graph?

Origin
  • 2,009
  • 5
  • 19
  • 19

1 Answers1

0

You could use the GraphTheory:-DrawGraph command.

The various display options of the DrawGraph command will not produce something laid out exactly like how DrawPlanar would do it.

I don't know of any reason for DrawPlanar to not support directed graphs; it just seems to be how it is programmed. I would suppose that DrawPlanar could be (re)programmed to use instead a mix of HasArc and HasEdge commands, etc, and attain the broader functionality.

acer
  • 6,671
  • 15
  • 15
  • The whole point of my code is to get a planar representation.DrawGraph would just give a random representation, no guarantees for anything to be planar. The options allow to specify styles but when I ask for a planar graph it redirects the call to DrawPlanar. I don't think me as a user could reprogram any of the routines. – Origin Oct 19 '12 at 06:50