get positions of graph vertices
(optional) one or more options as specified below
dimension=2 or 3
The number of dimensions in the layout to return. The default is 2.
layout=default, bipartite, circle, fixed, grid, network, planar, random, spectral, spring, tree, or user.
The layout option directs GetVertexPositions to return a previously computed layout with the specified layout method. The name style is a synonym for this option.
If no layout method is specified, the vertex positions corresponding to the default drawing style of the graph are returned.
output=list or Matrix
Specifies whether the points should be output as a list of lists or as a Matrix. The default is list.
The GetVertexPositions('G', 'opts') command returns a list of coordinates representing the positions of the vertices in a previously computed layout.
If a layout is specified with the layout option and this layout was not previously computed, the empty list is returned.
vp ≔ GetVertexPositions⁡CycleGraph⁡9
G ≔ Graph⁡Trail⁡0,1,2,3,4,5,6,7,8,9,1,Trail⁡4,0,7
G≔Graph 1: an undirected graph with 10 vertices and 12 edge(s)
We will disguise the Petersen graph by drawing it using the spring option and make those vertex positions the default.
P ≔ PetersenGraph⁡
P≔Graph 2: an undirected graph with 10 vertices and 15 edge(s)
S ≔ GetVertexPositions⁡P,layout=spring
Q ≔ CopyGraph⁡P
Q≔Graph 3: an undirected graph with 10 vertices and 15 edge(s)
The GraphTheory[GetVertexPositions] command was updated in Maple 2020.
The dimension, layout and output options were introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
Download Help Document
What kind of issue would you like to report? (Optional)