I'm working on a graph theory problem where it is very helpful to draw
the vertices of the graph in a line and then the edges as arcs between
the vertices.  I can't seem to figure out how to alter where an edge
goes in sage, specifically wanting it to not go in a straight line.
Is this easily accomplished?  Here is some sample (notebook) code so
you can see what I mean:

****************************************

g = graphs.RandomGNP(10,.5)
t = Graph()
t = g.steiner_tree(g.vertices()[:5])
t.plot()

pos_dict = {}
for i in range(5):
    pos_dict[i] = [i,0]

t.show(pos=pos_dict)

****************************************

Chances are, the random graph you got will look like a path on five
vertices when it prints the second time, but it's only because all of
the edges are overlapping.

Thanks!

~Katie

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to