Ask Your Question

Revision history [back]

It is doable as follows:

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

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)

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'})