New in Wolfram
Mathematica
8: Graph & Network Modeling
◄
previous
|
next
►
Application Areas
Custom Vertex and Edge Labeling
Automatic and fully customizable labeling of vertices and edges in
Mathematica
8.
In[1]:=
X
place[name_] := Placed[Style[ToString[#], 9, Bold, FontFamily -> "Verdana"] & /@ name, name];
In[2]:=
X
PetersenGraph[6, 3, VertexLabels -> {1 -> place[{Above, After, Below, Before}], 3 -> place[{Left, Top, Right, Bottom}] }, EdgeLabels -> {9 \[UndirectedEdge] 10 -> place[{"Start", "Middle", "End"}]}, EdgeStyle -> Directive[White, Thick], VertexSize -> {0.15, 1 -> 0.3, 3 -> 0.7}, ImagePadding -> 20, ImageSize -> 500, Background -> Hue[.6, .2, .95] ]
Out[2]=