Equivalent of RadialOutside for Graph VertexLabels
g = Graph[CompleteGraph[26],
VertexLabels -> Table[i -> Placed["Name", {{0,0},
{-Cos[Pi/2 + 2 i Pi/26], .25 - Sin[Pi/2 + 2 i Pi/26]}}], {i, 26}]]
Not to detract from PatoCriollo's excellent answer, but just to show that there is always a "there is also...".
Furthermore, the following, to my surprise, is not as fragile as I thought it might be with respect changes in ImageSize
and in the vertex count of CompleteGraph
.
vc = GraphEmbedding[CompleteGraph[26]];
g = Graph[EdgeList@CompleteGraph[26],
VertexLabelStyle -> Directive[{16, Bold, "Panel"}], ImagePadding -> 20,
VertexLabels -> Table[i -> Placed["Name", .5 + Pi vc[[i]]], {i, 26}]]
gr = With[{vc = GraphEmbedding[CompleteGraph[#]]},
Graph[EdgeList@CompleteGraph[#],
VertexLabelStyle -> Directive[{16, Bold, "Panel"}],
ImagePadding -> 20, ImageSize -> #2,
VertexLabels -> Table[i -> Placed["Name", .5 + Pi vc[[i]]], {i, #}]]] &;
Row[gr[#, 300] & /@ {10, 16, 26}]
Row[gr[16, #] & /@ {200, 300, 500}]
If you don't mind having a Graphics
rather than a Graph
object, you can use
GraphComputation`GraphPropertyChart
which combines a PieChart
with the edges of a graph:
GraphComputation`GraphPropertyChart[CompleteGraph[16],
ChartStyle -> "Rainbow",
ChartBaseStyle -> Directive[EdgeForm[], Opacity[.3]]]
Use the options LabelingFunction -> (Placed[#2[[2]], "VerticalCallout"] &)
and ChartLabels -> None
to get
Use CompleteGraph[32]
as the first argument to get
To remove the annuli, use ChartElementFunction -> None
:
GraphComputation`GraphPropertyChart[CompleteGraph[25],
ChartStyle -> "Rainbow",
ChartLabels -> Placed[Range[25], "RadialCallout"],
ImageSize -> 450, ChartElementFunction -> None,
ChartBaseStyle -> Opacity[.5]] /. _Disk :> {}
Use ChartLabels -> Placed[Range[25], "VerticalCallout"]
to get