# Different nodes sizes in png, same attributes in dot?

**URL:** <https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646>\
**Category:** Help\
**Created:** [May 10, 2021, 4:44pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646 "2021-05-10T16:44:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 10, 2021, 4:44pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/1 "2021-05-10T16:44:07Z")

</div>

The dot attributes are the same:

```auto
strict digraph G {

forcelabels=false
ratio=fill
splines=spline
overlap=scale
size="1.3,1.3"

node [shape=circle,
      fixedsize=true,
      width=6,
      label="",
      color="black",
      fillcolor="#6666ee",
      style="filled,solid"]

```

The .png files show different node sizes:  
 ![_e0_1](https://global.discourse-cdn.com/graphviz/original/1X/b32fd4dbfaff5407cf24ec89cc6deab3989bdcbe.png)  
Sorry, I am not able to upgrade the other .png since I am a new user!

What may be the reason?

---

<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, 2021, 9:53pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/2 "2021-05-10T21:53:05Z")

</div>

[I’m confused, but I’m often confused, so I’m used to it.]  
I see 5 small purple-ish circles that are arguably the _same_ size. Let me ask some questions:

- what version of dot are you using? run `dot -V`
- what OS are you using (Linux, WIndows, MacOS, …)?
- how different are the node sizes - 1 or 2 percent, 50 percent, …
- what program(s) do you use to look at the .png files - MS paint, gimp, a web browser, ??
- Have you tried producing a different file format (svg, jpeg, gif, …) If so, were the sizes different?
- will you include your entire input file, the source above is incomplete

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 11, 2021, 8:08am UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/3 "2021-05-11T08:08:08Z")

</div>

> I see 5 small purple-ish circles that are arguably the same size.  
> Yes, there are two .dot files, one with five circles symmetrically arranged, the other with six circles symmetrically arranged too. The difference in the nodes sizes is only between the outputs, although in both dot files the default width attribute is 6, but in fact this attribute does not seem to have an effect on the circle size. I will put the files on the end of this reply, if the forum allows me to do so.  
> Let me ask some questions:

> what version of dot are you using? run dot -V  
> dot - graphviz version 2.43.0 (0)  
> what OS are you using (Linux, WIndows, MacOS, …)?  
> Linux Mint 20  
> how different are the node sizes - 1 or 2 percent, 50 percent, …  
> the circles for the 6 nodes graph are twice as big  
> what program(s) do you use to look at the .png files - MS paint, gimp, a web browser, ??  
> Xviewer 2.6.2  
> Have you tried producing a different file format (svg, jpeg, gif, …) If so, were the sizes different?  
> No, I did not. The pngs are processed further (with LaTeX), so the visual size is not changed by this. Also adding edges to the dot input has no effect on the circles sizes.  
> will you include your entire input file, the source above is incomplete

# 5 nodes (there are additional invisible nodes with width=0.0)

```auto
strict digraph G {

forcelabels=false
ratio=fill
splines=spline
overlap=scale
size="1.3,1.3"

node [shape=circle,
      fixedsize=true,
      width=6,
      label="",
      color="black",
      fillcolor="#6666ee",
      style="filled,solid"]

edge [arrowsize=15,
      penwidth=5]

      1 [pos="0,8.1!"];
      2 [pos="-9.9,1.1438!"];
      4 [pos="-5.5356,-8.6!"];
      5 [pos="5.5356,-8.6!"];
      3 [pos="9.9,1.1438!"];
      t1_2 [width=0.0,pos="-8.8,1.9167!"];
      t2_1 [width=0.0,pos="-1.1,7.327!"];
      t1_3 [width=0.0,pos="8.8,1.9167!"];
      t3_1 [width=0.0,pos="1.1,7.327!"];
      t2_4 [width=0.0,pos="-6.02,-7.5173!"];
      t4_2 [width=0.0,pos="-9.415,0.0612!"];
      t3_5 [width=0.0,pos="6.02,-7.5173!"];
      t5_3 [width=0.0,pos="9.415,0.0612!"];
      t4_5 [width=0.0,pos="4.3055,-8.6!"];
      t5_4 [width=0.0,pos="-4.3055,-8.6!"];
      t1_4 [width=0.0,pos="-4.9205,-6.7445!"];
      t4_1 [width=0.0,pos="-0.615,6.2445!"];
      t1_5 [width=0.0,pos="4.9205,-6.7445!"];
      t5_1 [width=0.0,pos="0.615,6.2445!"];
      t2_3 [width=0.0,pos="7.7,1.1438!"];
      t3_2 [width=0.0,pos="-7.7,1.1438!"];
      t4_3 [width=0.0,pos="8.185,0.0612!"];
      t3_4 [width=0.0,pos="-3.8205,-7.5174!"];
      t5_2 [width=0.0,pos="-8.185,0.0612!"];
      t2_5 [width=0.0,pos="3.8205,-7.5174!"];
}

```

# 6 nodes (there are additional invisible nodes with width=0.0)

```auto
strict digraph G {

forcelabels=false
ratio=fill
splines=spline
overlap=scale
size="1.3,1.3"

node [shape=circle,
      fixedsize=true,
      width=6,
      label="",
      color="black",
      fillcolor="#6666ee",
      style="filled,solid"]

edge [arrowsize=10,
      penwidth=5]

      1 [pos="0,9!"];
      2 [pos="-7.7942,4.5!"];
      3 [pos="7.7942,4.5!"];
      4 [pos="-7.7942,-4.5!"];
      5 [pos="7.7942,-4.5!"];
      6 [pos="0,-9!"];
      t1_6 [width=0.0,pos="0,-6.75!"];
      t6_1 [width=0.0,pos="0,6.75!"];
      t1_2 [width=0.0,pos="-5.8457,5.625!"];
      t2_1 [width=0.0,pos="-1.9486,7.875!"];
      t1_3 [width=0.0,pos="5.8457,5.625!"];
      t3_1 [width=0.0,pos="1.9486,7.875!"];
      t2_4 [width=0.0,pos="-7.7942,-2.25!"];
      t4_2 [width=0.0,pos="-7.7942,2.25!"];
      t3_5 [width=0.0,pos="7.7942,-2.25!"];
      t5_3 [width=0.0,pos="7.7942,2.25!"];
      t6_4 [width=0.0,pos="-5.8457,-5.625!"];
      t4_6 [width=0.0,pos="-1.9486,-7.875!"];
      t6_5 [width=0.0,pos="5.8457,-5.625!"];
      t5_6 [width=0.0,pos="1.9486,-7.875!"];
      t2_3 [width=0.0,pos="5.8457,4.5!"];
      t3_2 [width=0.0,pos="-5.8457,4.5!"];
      t4_5 [width=0.0,pos="5.8457,-4.5!"];
      t5_4 [width=0.0,pos="-5.8457,-4.5!"];
      t4_3 [width=0.0,pos="5.8457,3.375!"];
      t3_4 [width=0.0,pos="-5.8457,-3.375!"];
      t5_2 [width=0.0,pos="-5.8457,3.375!"];
      t2_5 [width=0.0,pos="5.8457,-3.375!"];
      t1_4 [width=0.0,pos="-6.82,-2.8125!"];
      t4_1 [width=0.0,pos="-0.9743,7.3125!"];
      t1_5 [width=0.0,pos="6.82,-2.8125!"];
      t5_1 [width=0.0,pos="0.9743,7.3125!"];
      t6_2 [width=0.0,pos="-6.82,2.8125!"];
      t2_6 [width=0.0,pos="-0.9743,-7.3125!"];
      t6_3 [width=0.0,pos="6.82,2.8125!"];
      t3_6 [width=0.0,pos="0.9743,-7.3125!"];
}

```

---

<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 11, 2021, 4:01pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/4 "2021-05-11T16:01:16Z")

</div>

I think image scaling is causing the node size issues.

- node **width** is set to 6. This is 6 _inches_, not _points_! Try **width=.1** (or so) (This bites me regularly too)
- if you need the **size** attribute, try adding a **!**. **size="1.3,1.3!"**
- I’m not sure you need the **ratio** attribute. Note that it affects scaling
- I don’t think you need the **overlap** attribute. note that it causes scaling also

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 12, 2021, 11:03am UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/5 "2021-05-12T11:03:54Z")

</div>

I think the image scaling as the reason too. But I miss a true control of it. It seems to me somewhat arbitrary. I checked the topics you proposed. Nothing was helping! The ratio attribute seems to me to be necessary, as I want to integrate the resulting pngs in a LaTeX table. I could find out, that a node width value 0.3 results in very tiny circles, so I kept a big value supposedly meaning, that any maximum size is used. But I did not find anything about such a maximum size. In contrast I found a strange effect not justifiable by the graph layout: In fact removing all the 0.0-width nodes in the 5-nodes graph effected, that the nodes appeared (nearly) as big as within the 6-nodes graph. But adding only one node “t4\_5 [width=0.0,pos=“4.3055,-8.6!”];” again led to the smaller size. Note, that t4\_5 lies between the visible nodes 4 and 5.

---

<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 13, 2021, 3:00pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/6 "2021-05-13T15:00:38Z")

</div>

For unknown reasons, **neato** was messing with your pinned layout. Here are reworked versions that seem close to your goal.  
Note: use **neato -n** or **neato -n2** to produce your output

```auto
    strict digraph G {
            // use this command: neato -n2 -T...
            // pos values were multiplied by 5
    	// widths are guesses
    	graph [bb="-60,-60,60,60"]; // generated manually
    	node [color=black,
    		fillcolor="#6666ee",
    		fixedsize=true,
    		label="",
    		shape=circle,
    		style="filled,solid"
    	];
    	// p1 and p2 exist to guarantee squareness - same X & Y dimensions	
    	p1	[pos="-55.000000,-55.000000",
    		shape=point,
    		width=.01,
    		style=invis];
    	p2	[pos="55.000000,55.000000",
    		shape=point,
    		width=.01,
    		style=invis];
    	1	[pos="0.000000,40.500000",
    		width=.1];
    	2	[pos="-49.500000,5.719000",
    		width=.1];
    	4	[pos="-27.678000,-43.000000",
    		width=.1];
    	5	[pos="27.678000,-43.000000",
    		width=.1];
    	3	[pos="49.500000,5.719000",
    		width=.1];

    	node[width=.05]
    	t1_2	[pos="-44.000000,9.583500"];
    	t2_1	[pos="-5.500000,36.635000"];
    	t1_3	[pos="44.000000,9.583500"];
    	t3_1	[pos="5.500000,36.635000"];
    	t2_4	[pos="-30.100000,-37.586500"];
    	t4_2	[pos="-47.075000,0.306000"];
    	t3_5	[pos="30.100000,-37.586500"];
    	t5_3	[pos="47.075000,0.306000"];
    	t4_5	[pos="21.527500,-43.000000"];
    	t5_4	[pos="-21.527500,-43.000000"];
    	t1_4	[pos="-24.602500,-33.722500"];
    	t4_1	[pos="-3.075000,31.222500"];
    	t1_5	[pos="24.602500,-33.722500"];
    	t5_1	[pos="3.075000,31.222500"];
    	t2_3	[pos="38.500000,5.719000"];
    	t3_2	[pos="-38.500000,5.719000"];
    	t4_3	[pos="40.925000,0.306000"];
    	t3_4	[pos="-19.102500,-37.587000"];
    	t5_2	[pos="-40.925000,0.306000"];
    	t2_5	[pos="19.102500,-37.587000"];
    }

```

And

```auto
        strict digraph G {
                // use this command: neato -n2 -T...
                // pos values were multiplied by 5
        	// widths are guesses
        	graph [bb="-60,-60,60,60"]; // generated manually
        	node [color=black,
        		fillcolor="#6666ee",
        		fixedsize=true,
        		label="",
        		shape=circle,
        		style="filled,solid"
        	];
        	// p1 and p2 exist to guarantee squareness - same X & Y dimensions
        	p1	[pos="-55.000000,-55.000000",
        		shape=point,
        		width=.01,
        		style=invis];
        	p2	[pos="55.000000,55.000000",
        		shape=point,
        		width=.01,
        		style=invis];
        	1	[pos="0.000000,45.000000",
        		width=.1];
        	2	[pos="-38.971000,22.500000",
        		width=.1];
        	3	[pos="38.971000,22.500000",
        		width=.1];
        	4	[pos="-38.971000,-22.500000",
        		width=.1];
        	5	[pos="38.971000,-22.500000",
        		width=.1];
        	6	[pos="0.000000,-45.000000",
        		width=.1];
        		
        	node[width=.05]
        	t1_6	[pos="0.000000,-33.750000"];
        	t6_1	[pos="0.000000,33.750000"];
        	t1_2	[pos="-29.228500,28.125000"];
        	t2_1	[pos="-9.743000,39.375000"];
        	t1_3	[pos="29.228500,28.125000"];
        	t3_1	[pos="9.743000,39.375000"];
        	t2_4	[pos="-38.971000,-11.250000"];
        	t4_2	[pos="-38.971000,11.250000"];
        	t3_5	[pos="38.971000,-11.250000"];
        	t5_3	[pos="38.971000,11.250000"];
        	t6_4	[pos="-29.228500,-28.125000"];
        	t4_6	[pos="-9.743000,-39.375000"];
        	t6_5	[pos="29.228500,-28.125000"];
        	t5_6	[pos="9.743000,-39.375000"];
        	t2_3	[pos="29.228500,22.500000"];
        	t3_2	[pos="-29.228500,22.500000"];
        	t4_5	[pos="29.228500,-22.500000"];
        	t5_4	[pos="-29.228500,-22.500000"];
        	t4_3	[pos="29.228500,16.875000"];
        	t3_4	[pos="-29.228500,-16.875000"];
        	t5_2	[pos="-29.228500,16.875000"];
        	t2_5	[pos="29.228500,-16.875000"];
        	t1_4	[pos="-34.100000,-14.062500"];
        	t4_1	[pos="-4.871500,36.562500"];
        	t1_5	[pos="34.100000,-14.062500"];
        	t5_1	[pos="4.871500,36.562500"];
        	t6_2	[pos="-34.100000,14.062500"];
        	t2_6	[pos="-4.871500,-36.562500"];
        	t6_3	[pos="34.100000,14.062500"];
        	t3_6	[pos="4.871500,-36.562500"];
        }

```

![fiveNodes1](https://global.discourse-cdn.com/graphviz/original/1X/b2da9bc37a4318fac2583dfc4d0aeda439caa6ae.png)  
 ![sixNodes1](https://global.discourse-cdn.com/graphviz/original/1X/00293bc2d35dec40938802c4706b7ae67ddc7574.png)

---

<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:** [May 13, 2021, 7:15pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/7 "2021-05-13T19:15:08Z")

</div>

We could possibly introduce a notation for units, e.g. width= “6pt”, width=“0.5 in” maybe the same year that a space colony is established on Mars.

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 16, 2021, 2:40pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/8 "2021-05-16T14:40:01Z")

</div>

I could not reproduce your results. The 5 (big) nodes example looks for me as: ???(I do not know how to include png! The nodes with different sizes are located arbitrarily! The same with your second example.) I am wondering, why you did not use the exclamation mark to force the positioning, but an attempt on my part in this direction resulted in an image showing no nodes at all.  
I made also further trials on the base of my dot files: I added corner points, as you did. I added a bb attribute to the graph. I used neato with -n and with -n2. No one of them had an effect on the strange behavior I described. After adding the zero-sized node t4\_5 the nodes 1…5 are only half as big. Btw I do not have this effect with adding t2\_3.

---

<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 16, 2021, 3:24pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/9 "2021-05-16T15:24:14Z")

</div>

- to include an image (png), use the “mountain-within-a-square” icon that is just to the right of the icon that looks like this: **\</\>** (see below)
- no guesses yet why we’re getting different results
- What version of Graphviz are you using? (dot -V)
- What OS are you using (Windows, Linux, …)?
- please show your command line (yes, I am grasping at straws)
- I am not pinning the nodes individually (with **!** ) because **neato -n** and **neato -n2** treat every object (node or edge) with a **pos** attribute as pinned ([FAQ | Graphviz](https://www.graphviz.org/faq/#FaqDotWithNodeCoords) and [FAQ | Graphviz](https://www.graphviz.org/faq/#FaqDottyWithCoords))
- **neato -n2** is only needed if you add edges

 ![icons](https://global.discourse-cdn.com/graphviz/original/1X/67e23d9bd07bfeca211120e8f045933dc9d9b592.png)

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 17, 2021, 2:22pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/10 "2021-05-17T14:22:12Z")

</div>

![b0.steveroush1](https://global.discourse-cdn.com/graphviz/original/1X/cc13ca2861e00de1d6fd2dafc1bc76e536637eb3.png)  
Here my result for your first example.

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 17, 2021, 2:23pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/11 "2021-05-17T14:23:40Z")

</div>

![b0.steveroush2](https://global.discourse-cdn.com/graphviz/original/1X/20b33e060e7e45c53f54d6642f85b86d76846cc1.png)  
… and here for the second one.

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 17, 2021, 2:29pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/12 "2021-05-17T14:29:52Z")

</div>

Platform and graphviz version always as mentioned above.  
My command line: neato -Kfdp -n -Tpng -o steveroush1.png steveroush1.dot

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 17, 2021, 3:17pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/13 "2021-05-17T15:17:54Z")

</div>

ok, I see: -Kfdp was messing up the nodes! Omiting it produces your image.

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 17, 2021, 4:49pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/14 "2021-05-17T16:49:57Z")

</div>

… but I have another issue with neato -n and neato -n2 now:  
 ![4n3e](https://global.discourse-cdn.com/graphviz/original/1X/6a050fec0097956d3de0423ac5589186af41e671.png)  
I want straight arrows, even they are laying one over the other. Here my dot file:

```auto
strict digraph G {

forcelabels=false
ratio=fill
splines=spline
overlap=scale
size="1.3,1.3"

node [shape=circle,
      fixedsize=true,
      width=0.15,
      label="",
      color="black",
      fillcolor="#8888ee",
      style="filled,solid"]

edge [arrowsize=0.5,
      penwidth=1]

      1 [pos="-9.9,9.9!"];
      2 [pos="-9.9,-9.9!"];
      3 [pos="9.9,9.9!"];
      4 [pos="9.9,-9.9!"];
      t1_2 [width=0.0,style=invis,pos="-9.9,-4.4!"];
      t2_1 [width=0.0,style=invis,pos="-9.9,4.4!"];
      t1_3 [width=0.0,style=invis,pos="4.4,9.9!"];
      t3_1 [width=0.0,style=invis,pos="-4.4,9.9!"];
      t1_4 [width=0.0,style=invis,pos="4.4,-4.4!"];
      t4_1 [width=0.0,style=invis,pos="-4.4,4.4!"];
      t2_3 [width=0.0,style=invis,pos="4.4,4.4!"];
      t3_2 [width=0.0,style=invis,pos="-4.4,-4.4!"];
      t2_4 [width=0.0,style=invis,pos="4.4,-9.9!"];
      t4_2 [width=0.0,style=invis,pos="-4.4,-9.9!"];
      t3_4 [width=0.0,style=invis,pos="9.9,-4.4!"];
      t4_3 [width=0.0,style=invis,pos="9.9,4.4!"];
      1 -> t1_2
      t1_2 -> 2 [dir="none"]
      2 -> t2_1
      t2_1 -> 1 [dir="none"]
      2 -> t2_3
      t2_3 -> 3 [dir="none"]
}

```

The original graph generated with dot -Kfdp was, as in the next reply. (Silly restriction!)

Can you give me a hint, how I can generate it with neato?

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 17, 2021, 4:50pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/15 "2021-05-17T16:50:37Z")

</div>

Here:  
 ![m4n3e_x](https://global.discourse-cdn.com/graphviz/original/1X/abdd92d2a9f034992591fc6fa74881fa1e43df41.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 17, 2021, 5:16pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/16 "2021-05-17T17:16:38Z")

</div>

splines=false ([Attributes | Graphviz](https://www.graphviz.org/doc/info/attrs.html#d:splines)) will probably do what you want.  
Note that your **pos** values are legal but may cause problems (pixelation?). You graph is defined as ~.27"x.27". ( **pos** units are points - 72 per inch)

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 18, 2021, 4:04pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/17 "2021-05-18T16:04:23Z")

</div>

> [@steveroush](#):
>
> splines=false

Yes, splines=false yields, what I want. As I observe, the pos values are scaling with the size value. But a white margin is disturbing me.  
 ![4n3e](https://global.discourse-cdn.com/graphviz/original/1X/1eaab498532981d8909084d2c384af152320a86f.png)  
How can I control it?

---

<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 18, 2021, 10:56pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/18 "2021-05-18T22:56:33Z")

</div>

margin [Attributes | Graphviz](https://www.graphviz.org/doc/info/attrs.html#d:margin) ?

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 19, 2021, 7:51am UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/19 "2021-05-19T07:51:54Z")

</div>

I tried margin=0.0 on graph level without an effect. I am not aware about the defaults on nodes and edges. Here my dot file:

```auto
strict digraph G {
forcelabels=false
ratio=fill
splines=false
overlap=scale
size="1.56,1.56!"
margin=0.0

node [shape=circle,
      fixedsize=true,
      width=0.20,
      label="",
      color="black",
      fillcolor="#8888ee",
      style="filled,solid"]

edge [arrowsize=0.7,
      penwidth=1.5]

      1 [pos="-9.9,9.9!"];
      2 [pos="-9.9,-9.9!"];
      3 [pos="9.9,9.9!"];
      4 [pos="9.9,-9.9!"];
      t1_2 [width=0.0,style=invis,pos="-9.9,-4.4!"];
      t2_1 [width=0.0,style=invis,pos="-9.9,4.4!"];
      t1_3 [width=0.0,style=invis,pos="4.4,9.9!"];
      t3_1 [width=0.0,style=invis,pos="-4.4,9.9!"];
      t1_4 [width=0.0,style=invis,pos="4.4,-4.4!"];
      t4_1 [width=0.0,style=invis,pos="-4.4,4.4!"];
      t2_3 [width=0.0,style=invis,pos="4.4,4.4!"];
      t3_2 [width=0.0,style=invis,pos="-4.4,-4.4!"];
      t2_4 [width=0.0,style=invis,pos="4.4,-9.9!"];
      t4_2 [width=0.0,style=invis,pos="-4.4,-9.9!"];
      t3_4 [width=0.0,style=invis,pos="9.9,-4.4!"];
      t4_3 [width=0.0,style=invis,pos="9.9,4.4!"];
      1 -> t1_2
      t1_2 -> 2 [dir="none"]
      2 -> t2_1
      t2_1 -> 1 [dir="none"]
      2 -> t2_3
      t2_3 -> 3 [dir="none"]
}

```

---

<div class="post-metadata">

**Author:** ![peterd](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@peterd](https://forum.graphviz.org/u/peterd)\
**Post date:** [May 21, 2021, 4:36pm UTC](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646/20 "2021-05-21T16:36:13Z")

</div>

Ad my post from May 11: The node size is dependent from the distance of t4\_5 from 5. Moving t4\_5 a little further away from 5 lets get the nodes bigger, but not as big as they are in my 6 nodes example. It seems this is an effect of overlap=scale.

[Next page](https://forum.graphviz.org/t/different-nodes-sizes-in-png-same-attributes-in-dot/646.md?page=2)
