This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

VertexShapeFunction

VertexShapeFunction
is an option and property for Graph and related functions that specifies a function to use to generate primitives for rendering each vertex.
  • The following option settings can be used:
Automaticthe default vertex function
Nonedo not render vertices
"name"a named vertex function
funca general vertex function
{vi->vfi,...}use vertex function for vertex
  • The wrapper Property can be used when creating graphs in functions such as Graph etc.
  • Use to get a list of all named vertex functions.
  • VertexShapeFunction->func specifies that each vertex should be rendered with the primitives provided by , where is the center, v the vertex name, and the width and the height.
  • The vertex function func should render the vertex primitives in the bounding box automatically computed by layout algorithms.
Draw vertices using a predefined vertex function:
Specify a vertex function for an individual vertex:
Use a Property wrapper to specify individual vertex functions:
Draw vertices by running a program:
Draw vertices using a predefined vertex function:
In[1]:=
Click for copyable input
Out[1]=
 
Specify a vertex function for an individual vertex:
In[1]:=
Click for copyable input
Out[1]=
 
Use a Property wrapper to specify individual vertex functions:
In[1]:=
Click for copyable input
Out[1]=
 
Draw vertices by running a program:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
VertexShapeFunction can be used for general graphs:
Matrix graphs:
Special graphs:
Random graphs:
Use VertexShapeFunction in a Property wrapper:
VertexShapeFunction can be combined with VertexStyle:
VertexShapeFunction has higher priority than VertexStyle:
VertexShapeFunction can be combined with VertexSize:
VertexShapeFunction has higher priority than VertexShape:
Get a list of built-in collections for VertexShapeFunction:
Use built-in settings for VertexShapeFunction in the collection:
Simple basic shapes:
Common basic shapes:
Use built-in settings for VertexShapeFunction in the collection:
Use built-in settings for VertexShapeFunction in the collection:
Draw vertices using a predefined graphic using Inset:
New in 8