I'm trying to produce a digraph where some of the vertices are colored
differently based on their properties. I have no trouble creating the
partition or the vertex_color dictionary that can be passed either to
.graphplot() or .show() to do this. However, I'm having trouble displaying
some kind a legend to go along with the graph to explain which colors are
which properties.
Could someone proficient in the graphing methods give me a hand here.
Here is a simple example, where I've colored some of the verticies.
DiGraph({0:[1], 1:[0], 2:[2],3:[3],4:[4]}).graphplot(vertex_colors={(0.0,
1.0, 1.0): [0, 1], (1.0, 0.0, 0.0): [2,3,4]})
I'd like to display with the graph something like
color1 = property A
color2 = property B
Thanks,
Ben
--
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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.