Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Highlight nodes and edges in plotted graph

`highlight(H,nodeIDs)`

`highlight(H,G)`

`highlight(H,s,t)`

`highlight(___,Name,Value)`

`highlight(`

highlights the nodes and edges of graph `H`

,`G`

)`G`

by increasing their
node marker size and edge line width, respectively. `G`

must have
the same nodes and a subset of the edges of the underlying graph of
`H`

. If `G`

contains repeated edges, then they
are all highlighted. Isolated nodes with degree 0 are not highlighted.

`highlight(___,`

uses additional options specified by one or more Name-Value pair arguments using any
of the input argument combinations in previous syntaxes. For example,
`Name,Value`

)`highlight(H,nodes,'NodeColor','g')`

highlights a subset of
nodes by changing their color to green, instead of increasing their marker
size.

Was this topic helpful?