VertexShapeFunction
is an option and annotation for Graph and related functions that specifies a function to use to generate primitives for rendering each vertex.
Details
- The following option settings can be used:
-
Automatic the default vertex function None do not render vertices "name" a named vertex function func a general vertex function {vi->vfi,…} use vertex function vfi for vertex vi {pattivfi,…} use vfi for vertices matching the pattern patti - The wrapper Annotation[v,VertexShapeFunction->f] can be used when creating graphs in functions such as Graph etc.
- Use ResourceData["VertexShapeFunction"] to get a list of all named vertex functions.
- VertexShapeFunction->func specifies that each vertex should be rendered with the primitives provided by func[{x,y},v,{w,h}], where {x,y} is the center, v the vertex name, and {w,h} the width and the height.
- The vertex function func should render the vertex primitives in the bounding box {{x-w,x+w},{y-h,y+h}} automatically computed by layout algorithms.
Examples
open allclose allBasic Examples (4)
Draw vertices using a predefined vertex function:
Specify a vertex function for an individual vertex:
Use an Annotation wrapper to specify individual vertex functions:
Scope (13)
VertexShapeFunction Specification (9)
VertexShapeFunction can be used for general graphs:
Use VertexShapeFunction in an Annotation wrapper:
VertexShapeFunction works with patterns:
VertexShapeFunction can be combined with VertexStyle:
VertexShapeFunction has higher priority than VertexStyle:
VertexShapeFunction can be combined with VertexSize:
VertexShapeFunction has higher priority than VertexShape:
VertexShapeFunction Gallery (4)
Get a list of built-in collections for VertexShapeFunction:
Use built-in settings for VertexShapeFunction in the "Basic" collection:
Use built-in settings for VertexShapeFunction in the "Rounded" collection:
Use built-in settings for VertexShapeFunction in the "Concave" collection:
Possible Issues (1)
Use Inset to render graphics or an image:
VertexShape takes graphics or images used for vertices:
Text
Wolfram Research (2010), VertexShapeFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexShapeFunction.html.
CMS
Wolfram Language. 2010. "VertexShapeFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VertexShapeFunction.html.
APA
Wolfram Language. (2010). VertexShapeFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexShapeFunction.html