Rado wrote:
> 
> What might be even better is to send a particular embedding to the
> editor (i.e. send the adj. lists + vertices coordinates), but I am not
> sure if this info is easily extractable (in simple (x,y) form) from
> the graph theory libraries.


Yes, it is simple:

sage: g=graphs.PathGraph(6)
sage: g.get_pos()
{0: [0, 0], 1: [1, 0], 2: [2, 0], 3: [3, 0], 4: [4, 0], 5: [5, 0]}


See g.get_pos?  for an example of how to layout a graph if the position 
dictionary is not specified in the graph definition.

You can set the position dictionary with g.set_pos().

Thanks,

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to