1 | initial version |
Not very nice, but this sort of works. First install ''dot2tex'' using ''sage -i dot2tex''. Then
sage: g1 = Graph([(1,2),(2,3)], immutable=True)
sage: g2 = Graph([(1,2),(1,3)], immutable=True)
You can also do this like that : "g = g.copy(immutable=True)"
sage: G = DiGraph({g1:[g2]})
sage: G.set_latex_options(format='dot2tex')
sage: view(G)
This outputs a pdf file.
You can then try to play with the options to get a better layout.