is an option to CommunityGraphPlot that controls what labels and placement to use for communities.
CommunityLabels
is an option to CommunityGraphPlot that controls what labels and placement to use for communities.
Details
- Possible settings include:
-
None no labels {lbl1,…} label successive communities
Examples
open all close allBasic Examples (2)
Scope (7)
Use Placed with symbolic locations to control label placement, including outside positions:
Table[CommunityGraphPlot[[image], CommunityLabels -> Placed[{"a", "b", "c"}, p]], {p, {Before, After, Below, Above}}]Symbolic outside corner positions:
pl = {{Before, Below}, {After, Below}, {Before, Above}, {After, Above}};Table[CommunityGraphPlot[[image], CommunityLabels -> Placed[{"a", "b", "c"}, p]], {p, pl}]Table[CommunityGraphPlot[[image], CommunityLabels -> Placed[{"a", "b", "c"}, p]], {p, {Left, Top, Right, Bottom}}]Use explicit coordinates to place the center of labels:
Table[CommunityGraphPlot[[image], CommunityLabels -> Placed[{"a", "b", "c"}, p]], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Place all labels at the upper-right corner of the vertex and vary the coordinates within the label:
Table[CommunityGraphPlot[[image], CommunityLabels -> Placed[{"a", "b", "c"}, {{1, 1}, p}]], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Use Labeled to add a label to a community:
CommunityGraphPlot[[image], {{4, 7, 9, 10}, Labeled[{1, 5, 6}, "lbl1"], {2, 3, 8}}]Use more elaborate formatting functions:
rotateLabel[lbl_] := Rotate[lbl, 45Degree]CommunityGraphPlot[[image], CommunityLabels -> Placed[{"a", "b", "c"}, Above, rotateLabel]]See Also
Related Guides
-
▪
- Labels
History
Text
Wolfram Research (2012), CommunityLabels, Wolfram Language function, https://reference.wolfram.com/language/ref/CommunityLabels.html.
CMS
Wolfram Language. 2012. "CommunityLabels." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CommunityLabels.html.
APA
Wolfram Language. (2012). CommunityLabels. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CommunityLabels.html
BibTeX
@misc{reference.wolfram_2026_communitylabels, author="Wolfram Research", title="{CommunityLabels}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CommunityLabels.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_communitylabels, organization={Wolfram Research}, title={CommunityLabels}, year={2012}, url={https://reference.wolfram.com/language/ref/CommunityLabels.html}, note=[Accessed: 13-June-2026]}