HighlightGraph

HighlightGraph[g, {a1, a2, ...}]
highlights the that can be vertices, edges, or subgraphs of g.

HighlightGraph[g, {..., wj[aj], ...}]
highlights using the symbolic wrappers .

Details and OptionsDetails and Options

  • The following wrappers can be used:
  • Annotation[a,label]provide an annotation
    Button[a,action]define an action to execute when the element is clicked
    EventHandler[a,...]define a general event handler for the element
    Hyperlink[a,uri]make the element act as a hyperlink
    Labeled[a,...]display the element with labeling
    PopupWindow[a,cont]attach a popup window to the element
    Property[a,name->value]set a property for the element
    StatusArea[a,label]display in the status area when moused over
    Style[a,opts]show the element using the specified styles
    Tooltip[a,label]attach an arbitrary tooltip to the element
  • HighlightGraph takes the same options as Graph.
  • Styles and other specifications for vertices and edges are taken to apply to the highlighted elements .

ExamplesExamplesopen allclose all

Basic Examples (4)Basic Examples (4)

Highlight vertices 1, 2, and 3:

In[1]:=
Click for copyable input
Out[1]=

Highlight edges and :

In[1]:=
Click for copyable input
Out[1]=

Highlight vertices 1, 2, and 3 and edges and :

In[1]:=
Click for copyable input
Out[1]=

Highlight the subgraph defined by a shortest path:

In[1]:=
Click for copyable input
Out[1]=
New in 8 | Last modified in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »