# How to add round edges rectangle nodes

**URL:** <https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164>\
**Category:** Help\
**Created:** [May 10, 2022, 4:54pm UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164 "2022-05-10T16:54:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ogah](https://avatars.discourse-cdn.com/v4/letter/o/bc8723/32.png) [@ogah](https://forum.graphviz.org/u/ogah)\
**Post date:** [May 10, 2022, 4:54pm UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/1 "2022-05-10T16:54:16Z")

</div>

Hello, everyone! I am new to Graphviz. Please, what parameter can add a round edge to the rectangle node as shown in the picture attached?  
 ![image](https://global.discourse-cdn.com/graphviz/original/1X/497214e9c2d0489482a2b2252da30283e3ada6fe.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:** [May 10, 2022, 6:41pm UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/2 "2022-05-10T18:41:51Z")

</div>

use: `style=rounded` ([style | Graphviz](https://graphviz.org/docs/attr-types/style/))  
Like so:  
MyNode [style=rounded label=“gini = 123\nsamples = 98765\nvalue = [123, 321]”]

---

<div class="post-metadata">

**Author:** ![ogah](https://avatars.discourse-cdn.com/v4/letter/o/bc8723/32.png) [@ogah](https://forum.graphviz.org/u/ogah)\
**Post date:** [May 11, 2022, 6:47am UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/3 "2022-05-11T06:47:03Z")

</div>

Thank you so much. I already got the syntax.

---

<div class="post-metadata">

**Author:** ![agunicat](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@agunicat](https://forum.graphviz.org/u/agunicat)\
**Post date:** [July 30, 2022, 3:17am UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/4 "2022-07-30T03:17:34Z")

</div>

hi @steveroush ,

i’ve searched around. do you know if we can edit the border radius?  
i couldn’t find anything

regards,  
c.

---

<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:** [July 30, 2022, 3:29am UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/5 "2022-07-30T03:29:28Z")

</div>

I’m pretty sure you _can’t_ set the radius. Nice idea, though it might make locating corner ports (mynode.ne, …) a harder task.

---

<div class="post-metadata">

**Author:** ![scnorth](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/scnorth/32/89_2.png) [@scnorth](https://forum.graphviz.org/u/scnorth)\
**Post date:** [August 1, 2022, 2:22am UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/6 "2022-08-01T02:22:29Z")

</div>

It is open source, we can read the code 🙂

I think this is where it happens: [lib/common/shapes.c · main · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/blob/main/lib/common/shapes.c#L554)

The definitions like RBCONST, RBCURVE, and slightly magic constants like d / 3.0 give one pause for thought. I would read under “case ROUNDED” and hope for enlightenment.

---

<div class="post-metadata">

**Author:** ![jsv-gv](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jsv-gv](https://forum.graphviz.org/u/jsv-gv)\
**Post date:** [April 16, 2025, 5:20pm UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/7 "2025-04-16T17:20:38Z")

</div>

But, is it possible to have it both `rounded` and `filled`? I don’t seem to be able to do so…

---

<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:** [April 16, 2025, 8:40pm UTC](https://forum.graphviz.org/t/how-to-add-round-edges-rectangle-nodes/1164/8 "2025-04-16T20:40:10Z")

</div>

Here is information about **style** ([style | Graphviz](https://www.graphviz.org/docs/attr-types/style/))  
Note that you can specify multiple values with a comma delimiter.

```auto
graph a{
  a [label="thing 1" shape=rect style="rounded,filled" fillcolor=aqua]
  b [label="thing 2" fontsize=22 shape=rect style="rounded,filled" fillcolor=pink]
}

```

Giving:  
 ![roundedFilled](https://global.discourse-cdn.com/graphviz/original/2X/0/03f5583d26a495a4684a80a2dbf8feca6e06770b.png)
