> Here, for example, is the Cayley graph of the alternating group A5: > > A = AlternatingGroup(5) > G = Graph(A.cayley_graph()) > s = G.graphviz_string() > f = open('graphfile.dot', 'w') > f.write(s) > f.close() >
Actually for this example graphviz's neato (i.e. spring model) doesn't do much better than SAGE's spring. What Sage seems to be missing completely is the functionality of dot, which is for acyclic directed graphs, but works with all graphs (i.e. acyclicity is not enforced). SAGE has a tree layout but it is enforced the graph to be a tree (unless I am overlooking something there is no "user" way around it). However, imagine a graph that is a huge tree with only one cycle. Such graph will benefit more from a tree layout that spring (just by ignoring the extra edge and adding it at the end). According to the manual of graphviz "dot" implements this paper (so it might be worth looking at): Emden R. Gansner, Eleftherios Koutsofios, Stephen C. North, and Kiem- Phong Vo. A Technique for Drawing Directed Graphs. IEEE Trans. Sofware Eng., 19(3):214–230, May 1993. PS. to see the pictures use the code above in sage and then "{dot, neato or dfp} -Tpng graphfile.dot > graph.png", assuming you have graphviz installed. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---