Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Graph label coloring: formatting possibilities

I have a graph with like this and would like to format ( e.g. color ) the edge labels more individual. Is it possible for example to mak from 'a|b' the 'a' red and 'b' blue? Also different font types ( bold, italic ) etc would be interesting.

G = Graph(multiedges=True)
G.add_edges( [(0,1,'a|b'),(1,2,'c|d'),(2,3,'e|f'),(3,4,'g|h'),(4,0,'i|j')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()

Graph label coloring: formatting possibilities

I have a graph with like this and would like to format ( e.g. color ) the edge labels more individual. Is it possible for example to mak make from 'a|b' the 'a' red and 'b' blue? Also different font types ( bold, italic ) etc would be interesting.

G = Graph(multiedges=True)
G.add_edges( [(0,1,'a|b'),(1,2,'c|d'),(2,3,'e|f'),(3,4,'g|h'),(4,0,'i|j')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()

Graph label coloring: edge label: formatting possibilities

I have a graph with like this and would like to format ( e.g. color ) the edge labels more individual. Is it possible for example to make from 'a|b' the 'a' red and 'b' blue? Also different font types ( bold, italic ) etc would be interesting.

G = Graph(multiedges=True)
G.add_edges( [(0,1,'a|b'),(1,2,'c|d'),(2,3,'e|f'),(3,4,'g|h'),(4,0,'i|j')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()

Graph edge label: formatting possibilities

I have a graph with like this and would like to format ( e.g. color ) the edge labels more individual. Is it possible for example to make from 'a|b' the 'a' red and 'b' blue? Also different font types ( bold, italic ) etc would be interesting.

G = Graph(multiedges=True)
G.add_edges( [(0,1,'a|b'),(1,2,'c|d'),(2,3,'e|f'),(3,4,'g|h'),(4,0,'i|j')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()

When I remember correctly, there is (limited) support for TeX-formatting, could this be used somehow to achieve the formatting?