Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: edge labels
Replies: 3   Last Post: Mar 4, 2010 5:31 AM

 Messages: [ Previous | Next ]
 Simon Tyler Posts: 166 Registered: 8/14/06
Re: edge labels
Posted: Mar 4, 2010 5:31 AM

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...@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...@metrohm.com>
> Internet:<http://www.metrohm.com>

Date Subject Author
3/2/10 André Hautot
3/2/10 Bob Hanlon
3/3/10 dh
3/4/10 Simon Tyler