Not sure what prevents this from working.
A similar question was asked recently on Ask Sage:
How to LaTeX the graph of a permutation?
https://ask.sagemath.org/question/52649
Could you try the following workarounds below,
inspired by the answers to that question?
One solution is to use the optional package slabbe.
The other one is to define:
def graph_from_permutation(perm):
ee = [(i+1, perm[i]) for i in range(len(perm))]
return DiGraph(ee, loops=True)
and then you can do:
sage: p = Permutation([3, 2])
sage: g = graph_from_permutation(p)
sage: show(g)
Or you could define
def show_permutation(perm):
ee = [(i+1, perm[i]) for i in range(len(perm))]
g = DiGraph(ee, loops=True)
show(g)
and you could directly call
sage: show_permutation(Permutation([3, 2]))
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/55ea836a-f8ea-4a90-bedf-00620e36e849o%40googlegroups.com.