Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Graphs & Networks > Graph Styling, Labeling, and Layout > VertexStyle >
Mathematica > Visualization and Graphics > Graphs & Networks > Graph Styling, Labeling, and Layout > VertexStyle >

VertexStyle

VertexStyle
is an option and property for Graph and related functions that specifies what style to use for vertices.
  • The following option settings can be used:
Automaticuse automatic setting for style
styleuse style for all vertices
{v1->style1,v2->style2,...}use for vertex
  • Vertices with no explicit vertex style are taken to use the automatic style.
  • The wrapper Style is equivalent to Property and can be used when creating graphs in functions such as Graph etc.
  • To specify multiple style directives use Directive.
  • Style and other specifications are effectively applied in the order VertexStyle, Style and other wrappers, and VertexShapeFunction, with later specifications overriding earlier ones.
Set the style for all vertices:
Specify the style for individual vertices:
Set the style for all vertices:
In[1]:=
Click for copyable input
Out[1]=
 
Specify the style for individual vertices:
In[1]:=
Click for copyable input
Out[1]=
VertexStyle can be used for general graphs:
Matrix graphs:
Special graphs:
Random graphs:
Use VertexStyle in a Property wrapper:
Alternatively, use a Style wrapper:
Use Directive to set multiple style directives:
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:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF