VertexStyle

VertexStyle

is an option and annotation for Graph and related functions that specifies what style to use for vertices.

Details

  • The following option settings can be used:
  • Automaticuse automatic setting for style
    styleuse style for all vertices
    {v1style1,v2style2,}use stylei for vertex vi
    {patt1style1,patt2style2,}use stylei for vertices matching the pattern patti
  • Vertices with no explicit vertex style v->style are taken to use the automatic style.
  • The wrapper Style[v,style] is equivalent to Annotation[v,VertexStyle->style] and can be used when creating graphs in functions such as Graph etc.
  • VertexStyle can apply to points, lines, and faces.
  • To specify multiple style directives use Directive[style1,style2,].
  • Style and other specifications are effectively applied in the order VertexStyle, Style and other wrappers, and VertexShapeFunction, with later specifications overriding earlier ones.

Examples

open allclose all

Basic Examples  (2)

Set the style for all vertices:

Specify the style for individual vertices:

Scope  (10)

VertexStyle can be used for general graphs:

Matrix graphs:

Special graphs:

Random graphs:

Use VertexStyle in an Annotation wrapper:

Alternatively, use a Style wrapper:

Use Directive to set multiple style directives:

VertexStyle works with patterns:

VertexStyle can be combined with VertexShapeFunction:

VertexShapeFunction has higher priority than VertexStyle:

VertexStyle can be combined with BaseStyle:

VertexStyle has higher priority than BaseStyle:

VertexShape is not affected by VertexStyle:

Introduced in 2010
 (8.0)