is an option to Graph and related objects that specifies graph elements to highlight.
GraphHighlight
is an option to Graph and related objects that specifies graph elements to highlight.
Details
- The setting GraphHighlight->{v1,v2,…,e1,e2,…} for vertices vi and edges ej indicates the vertices and edges to highlight.
Examples
open all close allBasic Examples (1)
Scope (7)
GraphHighlight works with vertices:
GridGraph[{2, 3}, VertexSize -> Small, GraphHighlight -> {1, 6}]GridGraph[{2, 3}, VertexSize -> Small, GraphHighlight -> {13, 34, 46}]GridGraph[{2, 3}, VertexSize -> Small, GraphHighlight -> {1, 6, 34}]GraphHighlight works with general graphs:
{Graph[{12, 23, 31}, VertexSize -> Tiny, GraphHighlight -> {12, 3}], PathGraph[Range[5], VertexSize -> Medium, GraphHighlight -> {12, 3}]}AdjacencyGraph[{{0, 1, 1}, {1, 0, 1}, {1, 1, 0}}, VertexSize -> Tiny, GraphHighlight -> {12, 3}]{PetersenGraph[5, 2, VertexSize -> Medium, GraphHighlight -> {13, 8}], GridGraph[{3, 3}, VertexSize -> Small, GraphHighlight -> {12, 8}]}RandomGraph[WattsStrogatzGraphDistribution[50, 0.3], VertexSize -> {"Scaled", 0.03}, GraphHighlight -> Range[25]]Properties & Relations (2)
Use HighlightGraph to highlight items in an existing graph:
HighlightGraph[[image], {1, 12, 23, 36, 6}]Use GraphHighlightStyle to specify the style of highlight:
PetersenGraph[5, 2, VertexSize -> Medium, GraphHighlight -> {13, 35, 52, 6, 7}, GraphHighlightStyle -> "Dashed"]See Also
Related Guides
History
Text
Wolfram Research (2010), GraphHighlight, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphHighlight.html.
CMS
Wolfram Language. 2010. "GraphHighlight." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GraphHighlight.html.
APA
Wolfram Language. (2010). GraphHighlight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphHighlight.html
BibTeX
@misc{reference.wolfram_2026_graphhighlight, author="Wolfram Research", title="{GraphHighlight}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/GraphHighlight.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_graphhighlight, organization={Wolfram Research}, title={GraphHighlight}, year={2010}, url={https://reference.wolfram.com/language/ref/GraphHighlight.html}, note=[Accessed: 13-June-2026]}