is an option to Graph and related functions that specifies what layout to use.


  • A graph layout is typically computed using several stages. With GraphLayout->{s1->m1,}, stage si is handled by method mi.
  • Possible graph layout stages are:
  • "VertexLayout"how to embed vertices
    "EdgeLayout"how to route edges
    "PackingLayout"how to place connected components of vertices
  • "VertexLayout" methods include:
  • Automaticautomatically select a layout
    Nonedo not compute a layout
  • Possible special embeddings include:
  • "BipartiteEmbedding"vertices on two parallel lines
    "CircularEmbedding"vertices on a circle
    "CircularMultipartiteEmbedding"vertices on segments of a circle
    "DiscreteSpiralEmbedding"vertices on a discrete spiral
    "GridEmbedding"vertices on a grid
    "LinearEmbedding"vertices on a line
    "MultipartiteEmbedding"vertices on several parallel lines
    "SpiralEmbedding"vertices on a 3D spiral projected to 2D
    "StarEmbedding"vertices on a circle with a center
  • Possible structured embeddings for layered graphs such as trees and directed acyclic graphs include:
  • "BalloonEmbedding"vertices on a circle with the center at the parent vertex
    "RadialEmbedding"vertices on a circular segment
    "LayeredDigraphEmbedding"vertices on parallel lines for directed acyclic graphs
    "LayeredEmbedding"vertices on parallel lines
  • Possible optimizing embeddings all minimize a quantity and include:
  • "GravityEmbedding"energy with vertices as mass points and edges as springs
    "HighDimensionalEmbedding"energy for spring-electrical in high dimension
    "PlanarEmbedding"number of edge crossings
    "SpectralEmbedding"weighted sum of squares distances
    "SpringElectricalEmbedding"energy with edges as springs and vertices as charges
    "SpringEmbedding"energy with edges as springs
    "TutteEmbedding"number of edge crossings and distance to neighbors
  • "EdgeLayout" methods include:
  • "DividedEdgeBundling"divide edges into segments bundle
    "HierarchicalEdgeBundling"bundle edges following a hierarchical tree structure
    "StraightLine"straight lines between edges
  • "PackingLayout" methods include:
  • "ClosestPacking"approximate closest packing from the top left
    "ClosestPackingCenter"approximate closest packing from the center
    "Layered"arrange in layers starting at the top left
    "LayeredLeft"arrange in layers starting at the left
    "LayeredTop"arrange in layers starting at the top
    "NestedGrid"arrange on a nested grid


open all close all

Basic Examples  (2)

Graph layouts on particular curves:

Click for copyable input

Graph layouts that satisfy optimality criteria:

Click for copyable input

Scope  (95)

Applications  (2)

Properties & Relations  (6)

Introduced in 2010
Updated in 2019