is an option and property for Graph and related functions that specifies what labels and label positions should be used for vertices.


  • The following option settings can be used:
  • Noneuse no vertex labels
    Automaticautomatically label vertices
    "Name"use the vertex name as a label
    {v1->lbl1,v2->lbl2,...}label vertex with etc.
  • The wrapper Labeled[v, lbl] is equivalent to Property[v, VertexLabels->lbl] and can be used when creating graphs in functions such as Graph etc.
  • Any expression can be used as a label.
  • Labeled[v, lbl, pos] and Placed[lbl, pos] can be used to place labels in relative position to the vertex box.
  • The following positions pos can be used for Labeled and Placed in positioning vertex labels:
  • Tooltip, StatusAreashow as tooltip or in status area on mouseover
    Centerplace label at center of vertex
    Before,After,Below,Aboveplace label outside before, after, etc.
    Left,Right,Bottom,Topplace label inside to the left, right, etc.
    {Before,Below},{After,Below}, label outside at corner before/below, etc.
    {Left,Bottom},{Right,Bottom}, label inside at corner left/bottom, etc.
    {{vx,vy},{lx,ly}}scaled position in the label at scaled position in the vertex

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Label individual vertices:

Click for copyable input

Label all vertices:

Click for copyable input

Use any expression as a label:

Click for copyable input
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »