Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for 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.

DetailsDetails

  • 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[v,VertexShapeFunction->f] 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.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

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]=
Introduced in 2010
(8.0)