SetVertexPositions - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

SetVertexPositions

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

SetVertexPositions(G, layout)

SetVertexPositions(G, vp)

Parameters

G

-

graph

layout

-

one of the graph layout methods described in GraphLayouts

vp

-

list of pairs or triples of numbers, or numeric Matrix with 2 or 3 columns

Description

• 

SetVertexPositions('G', 'vp') sets the vertex positions vp of the graph G for graph drawing.  The vertex positions should be input in the format [[x1,y1],[x2,y2],...,[xn,yn]] or [[x1,y1,z1],[x2,y2,z2],...,[xn,yn,zn]].

Examples

> 

with⁡GraphTheory:

> 

G≔Graph⁡6,1,2,1,4,2,3,2,5,3,6,4,5,5,6

G≔Graph 1: an undirected graph with 6 vertices and 7 edges

(1)
> 

DrawGraph⁡G

> 

vp≔0,0,0.5,0,1,0,0,0.5,0.5,0.5,1,0.5:

> 

SetVertexPositions⁡G,vp:

> 

DrawGraph⁡G

Compatibility

• 

The GraphTheory[SetVertexPositions] command was updated in Maple 2025.

See Also

DrawGraph

GetVertexPositions