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

Online Help

All Products    Maple    MapleSim


Grid Graph Layout Method

 

Options

Description

Examples

Options

• 

center=list(numeric)

  

a point for the center of the grid. The origin is the default.

• 

order=list({1,2,3})

  

the order in which to fill the grid, given in reverse priority.  The default is 1,2,3 which fills the 3rd (z) axis first, then the 2nd (y) axis, then finally the x-axis. For two dimensions, the third value is ignored so the valid options are 1,2 (sweep up columns) and 2,1 (sweep across rows).

• 

width=numeric

  

the width of the grid; 1.95 is the default.

Description

• 

The grid layout method evenly spaces the vertices of the graph along a grid in order starting in the corner in the negative direction, and filling in the positive direction on each axis in turn.

• 

This layout method works in two or three dimensions and is best suited to very sparse graphs.

Examples

withGraphTheory:

GGraphundirected,1,2,1,4,2,3,3,4

GGraph 1: an undirected graph with 4 vertices and 4 edge(s)

(1)

DrawGraphG,layout=grid

HRandomGraphs:-RandomGraph20,40

HGraph 2: an undirected graph with 20 vertices and 40 edge(s)

(2)

DrawGraphH,dimension=3,layout=grid

See Also

GraphTheory[DrawGraph]