func (g *marshalGraph) Dot(opts *DotOpts) []byte {
	if opts == nil {
		opts = &DotOpts{
			DrawCycles: true,
			MaxDepth:   -1,
			Verbose:    true,
		}
	}
	var w indentWriter
	w.WriteString("digraph {\n")
	w.Indent()
	w.WriteString(`compound = "true"` + "\n")
	w.WriteString(`newrank = "true"` + "\n")
	w.WriteString(`subgraph "root" {` + "\n")
	g.writeBody(opts, &w)
	opts.cluster = opts.MaxDepth != 0
	maxDepth := opts.MaxDepth
	if maxDepth == 0 {
		maxDepth = -1
	}
	for _, s := range g.Subgraphs {
		g.writeSubgraph(s, opts, maxDepth, &w)
	}
	w.Unindent()
	w.WriteString("}\n")
	return w.Bytes()
}
Returns the DOT representation of this Graph.
package dag
import (
	"bytes"
	"fmt"
	"sort"
	"strings"
)
type DotOpts struct {
	Verbose bool
	DrawCycles bool
	MaxDepth int
	cluster bool
}
type GraphNodeDotter interface {
	DotNode(string, *DotOpts) *DotNode
}
type DotNode struct {
	Name  string
	Attrs map[string]string
}