Re: edge labels
- To: mathgroup at smc.vnet.net
- Subject: [mg107988] Re: edge labels
- From: Simon <simonjtyler at gmail.com>
- Date: Thu, 4 Mar 2010 05:31:11 -0500 (EST)
- References: <hmiiqo$40m$1@smc.vnet.net> <hmlet4$jn4$1@smc.vnet.net>
Hi Andre,
A good way to change the edge label style, would be to use a custom
EdgeRenderingFunction
TreePlot[{{1 -> 2, "0"}, {2 -> 4, "0"}, {3 -> 6, "0"}, {1 -> 3, "1"},
{2 -> 5, "1"}, {3 -> 7, "1"}}, Top,
EdgeRenderingFunction -> ({Red, Line[#1], Black, Text[Style[#3,
Large], Mean@#1, Background -> White]} &)]
Simon
On Mar 3, 6:50 pm, dh <d... at metrohm.com> wrote:
> Hi Andre,
> you may give the characters some style.E.g.:
> c0 = Style["0", 16];
> c1 = Style["1", 16];
> TreePlot[{{1 -> 2, c0}, {2 -> 4, c0}, {3 -> 6, c0}, {1 -> 3,
> c1}, {2 -> 5, c1}, {3 -> 7, c1}}, Top]
> Daniel
>
> On 02.03.2010 09:38, Andre Hautot wrote:
>
> > I need to enlarge the size of the characters "0" and "1" in the display
> > of the following binary tree :
>
> > TreePlot[{{1 -> 2, "0"}, {2 -> 4, "0"}, {3 -> 6, "0"}, {1 -> =
3, "1"},
> > {2 -> 5, "1"}, {3 -> 7, "1"}}, Top]
>
> > but I have no idea how to do that. Any idea ?
> > Thanks in advance,
> > Andre
>
> --
>
> Daniel Huber
> Metrohm Ltd.
> Oberdorfstr. 68
> CH-9100 Herisau
> Tel. +41 71 353 8585, Fax +41 71 353 8907
> E-Mail:<mailto:d... at metrohm.com>
> Internet:<http://www.metrohm.com>