First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is doable as follows:

sage: G.plot(color_by_label={'a':'red', 'b':'blue', 'c':'green'})
click to hide/show revision 2
No.2 Revision

It is doable as follows:

sage: G.plot(color_by_label={'a':'red', 'b':'blue', 'c':'green'})

If you are lazy, you can let Sage decide the colors for you:

sage: G.plot(color_by_label=True)
click to hide/show revision 3
No.3 Revision

It is doable as follows:

sage: G.plot(color_by_label={'a':'red', 'b':'blue', 'c':'green'})

If you are lazy, you can let Sage decide the colors for you:

sage: G.plot(color_by_label=True)

Of course you can use the other options if needed:

sage: G.plot(edge_labels=True, graph_border=True, color_by_label={'a':'red', 'b':'blue', 'c':'green'})