Ask Your Question

herb's profile - activity

2020-12-15 05:01:00 +0100 received badge  Famous Question (source)
2018-05-16 02:44:18 +0100 received badge  Popular Question (source)
2018-05-16 02:44:18 +0100 received badge  Notable Question (source)
2018-02-01 12:22:55 +0100 received badge  Famous Question (source)
2017-03-03 13:32:22 +0100 received badge  Notable Question (source)
2015-12-14 21:26:09 +0100 received badge  Popular Question (source)
2015-01-09 14:28:16 +0100 commented answer Graph edge label: formatting possibilities

But the solution mentioned there does not allow to colorize sub-strings within the label differently, right?

2015-01-09 13:06:22 +0100 received badge  Editor (source)
2015-01-09 13:05:52 +0100 asked a question 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?

2015-01-08 11:24:10 +0100 commented answer Graph: colored edge labels

Is it also possible to color parts of the label differently, e.g. instead of making "label a" completely red, would it be possible to make the substring 'label' red and 'a' green? Or is it possible to use LATEX /HTML code for this string formatting?

2015-01-07 07:59:53 +0100 received badge  Scholar (source)
2015-01-06 20:10:47 +0100 asked a question Graph: colored edge labels

I'm trying to plot a graph with labels on the edges as follows:

G = Graph(multiedges=True)
G.add_edges( [(0,1,'a'),(1,2,'b'),(2,3,'c'),(3,4,'b'),(4,0,'a')] )
H = G.plot(edge_labels=True, graph_border=True)
H.show()

Is it possible to color the edge labels, e.g. making the "a" red, "b" blue etc?