Skip to content

5. GraphViz Examples

Example 1

  1. splines=false doesn't work well with labels - it often causes unexpected behavior
  2. splines=line is better for straight edges with labels
  3. The layout engine (dot, neato, fdp, etc.) significantly affects how edges are drawn
  4. Increasing nodesep and ranksep gives more space for straight edges
  5. Using labelfloat=true can help position labels better

G11221--2441--4551--5332--32--4662--63--6773--74--54--65--6885--86--76--87--825

  • nodesep for horizontal spacing
  • ranksep for more vertical spacing
  • len values for longer individual edges

Example 2

G11221--230441--424551--5252--428332--327662--6274--5294--6215--630885--8303--626773--7306--7286--8367--825

Depot Transactions

DepotTransactionsD1Depot 1C2Customer 2D1->C25.0 tonsC3Customer 3D1->C375.0 tonsC4Customer 4D1->C4100.0 tonsC12Customer 12D1->C12120.0 tonsD2Depot 2D3Depot 3D4Depot 4D5Depot 5C1Customer 1D5->C1120.0 tonsD5->C240.0 tonsD6Depot 6D7Depot 7D8Depot 8D8->C235.0 tonsC6Customer 6D8->C6100.0 tonsC10Customer 10D8->C1085.0 tonsD9Depot 9C5Customer 5D9->C5110.0 tonsD9->C1065.0 tonsC11Customer 11D9->C1195.0 tonsD10Depot 10D11Depot 11D12Depot 12C7Customer 7D12->C790.0 tonsC8Customer 8D12->C860.0 tonsC9Customer 9D12->C930.0 tons

Research, Learning Resources