Network Graph Layout Method
Options
Description
Examples
sink=vertex
specify a main sink for the network. If a sink is specified, then a source must also be given.
source=vertex
specify a main source for the network. If a source is specified then a sink must also be given.
orientation="horizontal" or "vertical"
layout the network left to right, or top to bottom respectively. The default is "vertical".
The network layout method renders the Graph as a network starting from a source and ending at a sink that are either given, or automatically determined by IsNetwork.
This layout method works only in two dimensions.
with⁡GraphTheory:
G≔Digraph⁡1,3,2,3,3,4,3,5
G≔Graph 1: a directed graph with 5 vertices and 4 arc(s)
DrawGraph⁡G,layout=network
H≔RandomGraphs:-RandomNetwork⁡11,0.4,acyclic
H≔Graph 2: a directed graph with 11 vertices and 20 arc(s)
DrawGraph⁡H,layout=network,layoutopts=orientation=horizontal
See Also
GraphTheory[DrawGraph]
GraphTheory[DrawNetwork]
GraphTheory[IsNetwork]
Download Help Document