Helloooooooo Dominique,
I read your email several times and was not able to find an obvious contadiction
anywhere in what you said, as you seem to understand well what is going on. This
being said, I cannot shake off the impression that you may expect the labels
(names) of your vertices to be taken into consideration when computing a
drawing. It *may* have an impact on the drawing indeed, but none you can predict
easily:
- Below, somewhere inside of the Graph class, your vertices are labelled as
integers. This is the labelling that matters, and we just "pick any" that we
find.
- This integer labelling will probably change, depending on the machine on which
you run the code (and the weather, Sage's mood, etc.)
Thus, do not expect that a triangle ABC will appear in some specific way,
just because the vertices are named 'ABC'.
When you run your `layout(...)` instruction, Sage computes a position for the
vertices as well as a combinatorial embedding. Both should agree: the
combinatorial embedding tell you, for every vertex v, the list of its neighbors
(in clockwise order). This is the order that you should see when plotting the
graph with this layout.
If you are interested by the faces, you can easily get the list of them. Each of
them will be given [in clockwise order] by the following command:
sage: Graph_1.faces()
Note that this command uses the layout/embedding that was previously computed
(because of 'save_pos=True').
>From the output of this command (or with .get_embedding) you can easily figure
out how the triangle ABC appears in the layout and, if this ordering does not
satisfy, "reverse" the layout, for instance with the following command (replaces
y with -y):
sage: Graph_1.set_pos({v:(x,-y) for v,(x,y) in Graph_1.get_pos().items()})
Calling .show() or .plot() will reflect (no pun intended) the changes.
Okayyy.. That was to help you "fix your problem" if it was blocking you
somehow. Now, perhaps you think that the solution should be easier, or that some
more documentation is needed, or that some functions may be changed, that some
may be added, that some should be rewritten.
If you see anything in this open-source software which you think should be done
differently to simplify your life's or other people's, then do not hestate to
state it here and, if you feel like it, to change Sage's source code to improve
it yourself (we will help whenever we can). This software is nothing but a
shared folder of code that we all use. We must change it whenever something
"could be better".
Have fun,
Nathann
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.