# Flowchart drawing

Hello all, I'm a newbie on the forum and I have two questions about Graphwiz: - Is it possible to force the 'A' ellipse to be on the left (I set the center parameter to false without any modification) ? - Is it possible to not trace line between a0 and a1 ? - Is it possible to have a line which starts from A and stops to the 1st line of the grey rectangle ? Thanks for your help

graph G { subgraph cluster0 { node [style=filled,color=white]; style=filled; color=lightgrey; a0 [shape=rectangle, color=lightblue]; a1 [shape=rectangle, color=lightblue]; a2 [shape=rectangle, color=lightblue]; a3 [shape=rectangle, color=lightblue]; a0 -- a1 -- a2 -- a3; } subgraph cluster1 { node [style=filled]; b0 -- b1 -- b2 -- b3; color=blue } A ; A -- a0 [lhead=cluster0]; A -- b0 [lhead=cluster1]; }

Hello erg,

Thanks for your answers. I've two additionnal questions.

Is it possible to define the space between a0 and a1 ?

Is it possible to change the style of the line from A to cluster1 ?

See attached picture.

AttachmentSize
Graphviz.png17.8 KB
Graphviz_2.png13.83 KB

### Is it possible to force

Is it possible to force the 'A' ellipse to be on the left (I set the center parameter to false without any modification) ?

If you mean you want A directly above the grey rectangle, increase the edge weight:

A -- a0  [weight=1000 lhead=cluster0];

If you want something else, where precisely do you want A placed?

- Is it possible to not trace line between a0 and a1 ?

Make the edge invisible

a0 -- a1 [style=invis];

- Is it possible to have a line which starts from A and stops to the 1st line of the grey rectangle ?

Add compound=true as a graph attribute.

```graph G {
compound=true
subgraph cluster0 {
graph [color=lightgrey,
style=filled
];
node [color=white,
style=filled
];
a0       [color=lightblue,
shape=rectangle,
style=filled];
a1       [color=lightblue,
shape=rectangle,
style=filled];
a0 -- a1 [style=invis];
a2       [color=lightblue,
shape=rectangle,
style=filled];
a1 -- a2;
a3       [color=lightblue,
shape=rectangle,
style=filled];
a2 -- a3;
}
subgraph cluster1 {
graph [color=blue];
node [style=filled];
b0       [style=filled];
b1       [style=filled];
b0 -- b1;
b2       [style=filled];
b1 -- b2;
b3       [style=filled];
b2 -- b3;
}
A -- a0  [weight=1000 lhead=cluster0];
A -- b0  [lhead=cluster1];
}

```

### Is it possible to force

Is it possible to force the 'A' ellipse to be on the left (I set the center parameter to false without any modification) ?

If you mean you want A directly above the grey rectangle, increase the edge weight:

A -- a0  [weight=1000 lhead=cluster0];

If you want something else, where precisely do you want A placed?

- Is it possible to not trace line between a0 and a1 ?

Make the edge invisible

a0 -- a1 [style=invis];

- Is it possible to have a line which starts from A and stops to the 1st line of the grey rectangle ?

Add compound=true as a graph attribute.

```graph G {
compound=true
subgraph cluster0 {
graph [color=lightgrey,
style=filled
];
node [color=white,
style=filled
];
a0       [color=lightblue,
shape=rectangle,
style=filled];
a1       [color=lightblue,
shape=rectangle,
style=filled];
a0 -- a1 [style=invis];
a2       [color=lightblue,
shape=rectangle,
style=filled];
a1 -- a2;
a3       [color=lightblue,
shape=rectangle,
style=filled];
a2 -- a3;
}
subgraph cluster1 {
graph [color=blue];
node [style=filled];
b0       [style=filled];
b1       [style=filled];
b0 -- b1;
b2       [style=filled];
b1 -- b2;
b3       [style=filled];
b2 -- b3;
}
A -- a0  [weight=1000 lhead=cluster0];
A -- b0  [lhead=cluster1];
}

```

### Flowchart drawing

Hello erg,

First of all, thanks for your answers. I've two additionnal questions:
Is it possible to define the distance between a0 and a1 ?
Is it possible to force the line between A and cluster1 to be horizontal ?

### Is it possible to define the

Is it possible to define the distance between a0 and a1 ?

Note that nodes are placed on discrete ranks, so can only specify the number of ranks separating them, the default being one. You can change this with the minlen attribute. It is called minlen because there might be other constraints on nodes that will force a greater separation.  For example, you could have

```a -> b -> c -> d -> e -> f
a -> f [minlen=2]
```

Here the long chain is going to force a distance of 5 between a and f.

Is it possible to force the line between A and cluster1 to be horizontal ?

There are various ways to do this. This simplest is to add constraint=false to the edge A -- a0. I would also suggest you move the edges involving A to the top of the graph file. You can also use rank=same, though if you are using this in conjunction with clusters (which you are), you also want to set the graph attribute newrank=true.