# Is there a way to draw "desks" (2 boxes side by side and 2 below them) without using arrows on graphviz?

**URL:** <https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987>\
**Category:** Help\
**Created:** [January 22, 2024, 8:48pm UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987 "2024-01-22T20:48:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![firfir](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/firfir/32/1476_2.png) [@firfir](https://forum.graphviz.org/u/firfir)\
**Post date:** [January 22, 2024, 8:48pm UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/1 "2024-01-22T20:48:18Z")

</div>

Hi there, this is my first time on this forum!

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 🙂

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [January 22, 2024, 11:43pm UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/2 "2024-01-22T23:43:35Z")

</div>

Graphviz is not well suited for tasks like this. In general I would suggest **pikchr** ([Pikchr: Documentation](https://pikchr.org/home/doc/trunk/homepage.md)) or some interactive layout program.  
That said:

```auto
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
}

```

Giving:

![fourRects](https://global.discourse-cdn.com/graphviz/original/2X/b/b463665a8fd71fa1177240cca820b89a7846de6b.png)

---

<div class="post-metadata">

**Author:** ![mark](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/mark/32/84_2.png) [@mark](https://forum.graphviz.org/u/mark)\
**Post date:** [January 23, 2024, 1:45am UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/3 "2024-01-23T01:45:06Z")

</div>

I think we need more information about what you’re trying to accomplish. I don’t know what it means to draw 4 desks.

Fwiw when our office organises desk moves… we draw the floorplan in google sheets, using it basically as graph paper.

---

<div class="post-metadata">

**Author:** ![firfir](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/firfir/32/1476_2.png) [@firfir](https://forum.graphviz.org/u/firfir)\
**Post date:** [January 23, 2024, 5:27am UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/4 "2024-01-23T05:27:10Z")

</div>

Hi there!

I tried to draw it on my phone (thats what i was trying to draw, just 4 boxes with no arrows)

 ![Screenshot_20240123_062300_Samsung Notes](https://global.discourse-cdn.com/graphviz/original/2X/6/6528f78bee905bb750141f1ede1de0734322a364.jpeg)

---

<div class="post-metadata">

**Author:** ![firfir](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/firfir/32/1476_2.png) [@firfir](https://forum.graphviz.org/u/firfir)\
**Post date:** [January 23, 2024, 5:27am UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/5 "2024-01-23T05:27:50Z")

</div>

Thank you so much!

---

<div class="post-metadata">

**Author:** ![BartB](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@BartB](https://forum.graphviz.org/u/BartB)\
**Post date:** [January 23, 2024, 10:49am UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/6 "2024-01-23T10:49:05Z")

</div>

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];

desk1;  
desk2;  
desk3;  
desk4;  
}  
giving  
[dot]  
graph {  
layout=“osage”;  
packmode=array\_ut2;  
node [shape=rect];

desk1;  
desk2;  
desk3;  
desk4;  
}  
[/dot]  
graph {  
layout=“osage”;  
packmode=array\_ut1;  
node [shape=rect];

desk1;  
desk2;  
desk3;  
desk4;  
}  
giving  
[dot]  
graph {  
layout=“osage”;  
packmode=array\_ut1;  
node [shape=rect];

desk1;  
desk2;  
desk3;  
desk4;  
}  
[/dot]

---

<div class="post-metadata">

**Author:** ![firfir](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/firfir/32/1476_2.png) [@firfir](https://forum.graphviz.org/u/firfir)\
**Post date:** [January 23, 2024, 11:51am UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/7 "2024-01-23T11:51:37Z")

</div>

didn’t knew about the layout osage, thank you so much!!

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [January 23, 2024, 3:00pm UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/8 "2024-01-23T15:00:27Z")

</div>

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.

thanks

---

<div class="post-metadata">

**Author:** ![BartB](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@BartB](https://forum.graphviz.org/u/BartB)\
**Post date:** [January 29, 2024, 1:37pm UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/9 "2024-01-29T13:37:40Z")

</div>

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.

An example of one of my diagrams i maintain using osage layout and [https://exceltographviz.com/](https://exceltographviz.com/)).

 ![image](https://global.discourse-cdn.com/graphviz/original/2X/a/a32c8d80785bd6c79d19988172aa6e85bae8b46b.png)

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [January 29, 2024, 2:29pm UTC](https://forum.graphviz.org/t/is-there-a-way-to-draw-desks-2-boxes-side-by-side-and-2-below-them-without-using-arrows-on-graphviz/1987/10 "2024-01-29T14:29:05Z")

</div>

Cool. I haven’t played with **osage** , yet - but it is on my “to do” list. Thanks.
