Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Simon Tyler

Posts: 166
Registered: 8/14/06
Re: edge labels
Posted: Mar 4, 2010 5:31 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.