[sage-support] how to display graph legend with colored digraph

2016-07-26 Thread Ben
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

Re: [sage-support] how to display graph legend with colored digraph

2016-07-26 Thread Jori Mäntysalo
On Tue, 26 Jul 2016, Ben wrote: .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. I'd like to display with the graph something like color1 = property A color2 = property B G

Re: [sage-support] how to display graph legend with colored digraph

2016-07-27 Thread Ben
That is great. Now, is there someway to permanently associate those two parameters to the graph? i.e., G.show() has the colors and title? On Wednesday, July 27, 2016 at 2:43:17 AM UTC-4, jori.ma...@uta.fi wrote: > > On Tue, 26 Jul 2016, Ben wrote: > > > .graphplot() or .show() to do this. Howev

Re: [sage-support] how to display graph legend with colored digraph

2016-07-27 Thread Jori Mäntysalo
Quoting Ben : That is great. Now, is there someway to permanently associate those two parameters to the graph? i.e., G.show() has the colors and title? AFAIK no. You can set positions for vertices with set_pos() and you can attach an arbitrary value to a vertex like G.set_vertex(2, 'red')