GetVertexPositions - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

GetVertexPositions

  

get positions of graph vertices

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

GetVertexPositions(G, opts)

Parameters

G

-

graph

opts

-

(optional) one or more options as specified below

Options

• 

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.

Description

• 

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.

Examples

(1)

(2)

We will disguise the Petersen graph by drawing it using the spring option and make those vertex positions the default.

(3)

(4)

(5)

Compatibility

• 

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.

See Also

DrawGraph

SetVertexPositions

Trail

 


Download Help Document