New in Wolfram
Mathematica
8: Graph & Network Modeling
◄
previous
|
next
►
Application Areas
Built-in Library of Vertex Shapes
Mathematica
8 has an extensive collection of built-in vertex shape functions.
In[1]:=
X
shapes = {"Capsule", "Circle", "ConcaveHexagon", "Diamond", "FiveDown", "Parallelogram", "RoundedUpTrapezoid", "Square", "Star"};
In[2]:=
X
graphs = Graph[{1 \[UndirectedEdge] 2, 1 \[UndirectedEdge] 6, 2 \[UndirectedEdge] 4, 2 \[UndirectedEdge] 3, 4 \[UndirectedEdge] 5, 5 \[UndirectedEdge] 1, 6 \[UndirectedEdge] 2}, VertexShapeFunction -> #, VertexSize -> 0.2, PlotLabel -> Style[#, 11, FontFamily -> "Verdana"], VertexStyle -> Directive[EdgeForm[None], Hue[.6, .5, .8]], EdgeStyle -> Gray, ImageSize -> {180, 150}] & /@ shapes;
In[3]:=
X
Grid[Partition[graphs, {3}], Frame -> All, FrameStyle -> LightGray]
Out[3]=