VertexCoordinates

VertexCoordinates

is an option to Graph and related functions that specifies the coordinates to use to place the center of vertices.

Details

  • The following settings for VertexCoordinates can be used:
  • Automaticautomatically compute vertex coordinates
    {v1pt1,}place vertex vi at center coordinate pti
    {pt1,pt2,}place vertex v1 at pt1 etc.
  • With the setting VertexCoordinates->Automatic, the center coordinates for vertices are computed according to the setting for GraphLayout.
  • With the setting VertexCoordinates->{pt1,pt2,}, the vertices {v1,v2,} are given in the order returned by VertexList.

Examples

open allclose all

Basic Examples  (3)

By default, any vertex coordinates are computed automatically:

Specify all vertex coordinates:

In this case, put them on a parabola:

Specify coordinates for some vertices:

Scope  (5)

VertexCoordinates can be used for general graphs:

Matrix graphs:

Special graphs:

Specify coordinates for some vertices:

Constraint coordinates:

Specify 3D coordinates for some vertices:

VertexCoordinates has higher priority than GraphLayout:

Applications  (6)

Use an automatic layout of a molecule:

Also specify the vertex coordinates:

Automatically draw a graph from its adjacency matrix:

Use specific embedding by setting vertex coordinates:

Generate a circle layout:

Grid layout:

Discrete spiral layout:

Generate a path graph with a specified layout:

Highlight the vertices on the inner circle:

Properties & Relations  (1)

All vertex coordinates in a list follow the order given by VertexList:

Introduced in 2010
 (8.0)
 |
Updated in 2020
 (12.1)