Warning! I posted the question when Mathematica v 8.0 was the coolest kid. The bug has been solved as of version 9.0.1
The help for EdgeLabels states:
EdgeLabels
works fine. EdgeWeights
does not.
It may already be obvious from Belisarius' second example that the problem lies with EdgeWeights
not EdgeLabels
Here's some additional evidence. EdgeLabels
very gladly displays a variety of labels correctly. But when you ask mma to display "EdgeWeights"
, it incorrectly displays 1's, no matter what you've stored there.
CompleteGraph[4, VertexShapeFunction -> "Name",
EdgeLabels -> {
UndirectedEdge[1, 2] -> "hello",
UndirectedEdge[1, 4] -> "goodbye", UndirectedEdge[2, 3] -> 55,
UndirectedEdge[3, 4] -> \[Pi]/2,
UndirectedEdge[4, 2] ->
"\!\(\*UnderoverscriptBox[\(\[Sum]\), \(i = 0\), \(26\)]\)(-1\!\(\
\*SuperscriptBox[\()\), \(i\)]\)\!\(\*SuperscriptBox[\(\[Theta]\), \
\(n - i\)]\)", UndirectedEdge[1, 3] -> {a, b, c}}]
The bug is not unique to CompleteGraph
. Graph
and GridGraph
have the same problem.