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:

Wolfram Research (2010), VertexCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexCoordinates.html (updated 2020).

Text

Wolfram Research (2010), VertexCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexCoordinates.html (updated 2020).

CMS

Wolfram Language. 2010. "VertexCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/VertexCoordinates.html.

APA

Wolfram Language. (2010). VertexCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexCoordinates.html

BibTeX

@misc{reference.wolfram_2024_vertexcoordinates, author="Wolfram Research", title="{VertexCoordinates}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/VertexCoordinates.html}", note=[Accessed: 17-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_vertexcoordinates, organization={Wolfram Research}, title={VertexCoordinates}, year={2020}, url={https://reference.wolfram.com/language/ref/VertexCoordinates.html}, note=[Accessed: 17-December-2024 ]}