Re: VertexWeight not showing in Graph
- To: mathgroup at smc.vnet.net
- Subject: [mg117208] Re: VertexWeight not showing in Graph
- From: Peter Pein <petsie at dordos.net>
- Date: Fri, 11 Mar 2011 04:35:29 -0500 (EST)
- References: <ilacf6$23b$1@smc.vnet.net>
Am 10.03.2011 12:25, schrieb Bob Hanlon: > I was unable to find anything that indicates EdgeLabels->"EdgeWeight" should work. Have a look at the documentation page for EdgeLabels and you'll find in the "More Information"-paragraph: The following option settings can be used: None use no edge labels "EdgeWeight" use the edge weight as a label {Subscript[v, i]\[UndirectedEdge]Subscript[v, j]->Subscript[lbl, ij],\[Ellipsis]} label edge Subscript[v, i]\[UndirectedEdge]Subscript[v, j] with Subscript[lbl, ij] etc. > However, based on the documentation I would use > > With[{gr = {1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, > 3 \[UndirectedEdge] 1}, wt = {2, 3, 4}}, > Graph[gr, EdgeWeight -> wt, > EdgeLabels -> Thread[gr -> wt]]] > > > Bob Hanlon > > ---- Lou<lvveen32 at xs4all.nl> wrote: > > ============= > Hi All, > I'm using the example in the helpfiles: > Graph[{1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, > 3 \[UndirectedEdge] 1}, EdgeWeight -> {2, 3, 4}] > I read that it's possible to show the edgeweight as a label with > EdgeLabels->"EdgeWeight" > However using that option doesn't show the expected (by me that is..) > 2,3 and 4. > See document on edgelabels. > What am I doing wrong? > Kind regards, > Laurent > > > I think that is 1. unmistakable 2. not true Peter