On 04/27/2010 07:32 AM, Rajeev wrote:
Hi,
I want to plot weighted graphs such that the link-width or color may
have the information of relative weights. Please point the relevant
document page. I couldn't find one.
Does this work?
sage: g=DiGraph(random_matrix(ZZ,5))
sage: g.weighted_adjacency_matrix()
[ 1 1 -1 2 -1]
[ 1 3 -38 -3 4]
[ -2 -1 -1 -1 -1]
[ 1 -1 -1 1 5]
[ -1 2 -2 -3 -7]
sage: plot(g, color_by_label=True)
See
http://www.sagemath.org/doc/reference/sage/graphs/generic_graph.html#sage.graphs.generic_graph.GenericGraph.plot
Thanks,
Jason
--
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