Re: weighted graph, edges thickness
- To: mathgroup at smc.vnet.net
- Subject: [mg104850] Re: weighted graph, edges thickness
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Thu, 12 Nov 2009 05:59:45 -0500 (EST)
- References: <hd8rus$5ks$1@smc.vnet.net>
Hi Cherif,
In V6 and 7 EdgeRenderingFunction will do the trick. Try the following
m = {{0, 2, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 5}, {1, 0, 0, 0}};
GraphPlot[m,
EdgeRenderingFunction -> ({Thickness[m[[#2[[1]], #2[[2]]]]/200],
Line[#1]} &), VertexLabeling -> True]
Cheers -- Sjoerd
On Nov 9, 12:46 pm, cherifrahal <cherif.ra... at gmail.com> wrote:
> Hello,
> I am very new to Mathematica and I am failing in trying to do
> something very simple.
>
> I have a graph structure and i have a weight matrix such taht each
> edge corresponding to a couple of nodes has a weight.
> I need to represent the weights of the edges by different thikness
> according to the value in the matrix
>
> Can any one help me please ?
>
> Thank's in advace
> Cherif Rahal