digraph { // rankdir=LR; subgraph cluster_comp0{ a->b; e->a; b->e; } subgraph cluster_comp1{ f->g; g->f; } subgraph cluster_comp2{ c->d; d->c; d->h; h->d; } b->c; e->f; c->g; h->g; }