is an option for GraphPlot and related functions that specifies how to draw self-loops that connect a vertex to itself.
SelfLoopStyle
is an option for GraphPlot and related functions that specifies how to draw self-loops that connect a vertex to itself.
Details
- Typical settings for SelfLoopStyle include:
-
Automatic draw self-loops for graphs given by explicit rules All always draw self-loops None never draw self-loops d draw self-loops as loops of radius d - With SelfLoopStyle->Automatic, self-loops are not drawn for graphs specified by adjacency matrices.
- SelfLoopStyle->1 makes self-loops have diameters roughly equal to the average edge length in GraphPlot graphs.
Examples
open all close allBasic Examples (2)
Scope (3)
Draw self-loops with a specified scaled diameter:
Table[GraphPlot[{1 -> 4, 1 -> 5, 2 -> 3, 2 -> 5, 3 -> 5, 4 -> 5, 5 -> 5}, SelfLoopStyle -> s], {s, {0.1, 0.25, 0.5, 1.}}]GraphPlot[{1 -> 4, 1 -> 5, 2 -> 3, 2 -> 5, 3 -> 5, 4 -> 5, 5 -> 5, 5 -> 5, 5 -> 5}]Draw multiple self-loops for a graph specified by its adjacency matrix:
GraphPlot[SparseArray[{{1, 4} -> 1, {1, 5} -> 1, {4, 5} -> 1, {5, 5} -> 4, {2, 3} -> 1, {2, 5} -> 1, {3, 5} -> 1}, {5, 5}], SelfLoopStyle -> All]See Also
Tech Notes
History
Text
Wolfram Research (2007), SelfLoopStyle, Wolfram Language function, https://reference.wolfram.com/language/ref/SelfLoopStyle.html.
CMS
Wolfram Language. 2007. "SelfLoopStyle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SelfLoopStyle.html.
APA
Wolfram Language. (2007). SelfLoopStyle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SelfLoopStyle.html
BibTeX
@misc{reference.wolfram_2026_selfloopstyle, author="Wolfram Research", title="{SelfLoopStyle}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/SelfLoopStyle.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_selfloopstyle, organization={Wolfram Research}, title={SelfLoopStyle}, year={2007}, url={https://reference.wolfram.com/language/ref/SelfLoopStyle.html}, note=[Accessed: 13-June-2026]}