i need to draw “desks” (my supervisor asked me to draw our office for my very first project, which is the infrastructure of the company) it contains 4 desks in total (i need to draw without the arrows for .py later!). I’m still new to graphviz and tried so many things but nothing worked out sadly.
thanks for reading this far, i hope someone can help me here
Graphviz is not well suited for tasks like this. In general I would suggest pikchr (Pikchr: Documentation) or some interactive layout program.
That said:
graph D{
graph [nodesep=.9 ranksep=.8] // tune these to rearrange nodes
node [shape=rect fixedsize=true width=1.4 height=.5 label=""]
edge [style=invis] // edges used, but are invisible
{rank=same
d1a [group=a] // group attributes may not be needed, but should not hurt
d1b [group=b]
}
{rank=same
d2a [group=a]
d2b [group=b]
}
d1a -- d2a
d1b -- d2b
}
There is also an easier way using the osage layout engine, you can play with the packmode to align the desks differently, the packmode can be set at subgraph level as well to mix layouts:
graph {
layout=“osage”;
packmode=array_ut2;
node [shape=rect];
Congratulations to BartB! This seems to be the first time that osage has been suggested as a solution on the forum. (It is not in my go-to toolset, yet).
Fun to learn about new (old) solutions.
Hi Steve, i use osage quit often in my work as an architect, i like to keep layers (clusters) of a diagram ordered for consistency in communication. I found that clusters jumping places from one presentation to the next using dot are confusing for most people.