# How to make this diagram clearer?

**URL:** https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800
**Category:** Help
**Created:** [August 31, 2021, 4:02pm UTC](https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800 "2021-08-31T16:02:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Max\_TRNQ](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Max\_TRNQ](https://forum.graphviz.org/u/Max_TRNQ)
#### Post date: [August 31, 2021, 4:02pm UTC](https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800/1 "2021-08-31T16:02:28Z")

</div>

Hello everyone.  
I recently discovered this program while looking for a tool to export Salesforce data model diagram into pdf. I have about 55 tables with associated joins between them. When I output the pdf, many lines get jumbled together and become hard to follow from one table to another. I use a salesforce app (ERDGenerator) to create the template and gv file, but I can modify them before outputting the pdf. Would you be able to give me any hints to format these lines in a better way? Thank you kindly.

gv file: [http://mlxsys.com/apollo/ApolloDiagram.gv](http://mlxsys.com/apollo/ApolloDiagram.gv)  
output pdf: [http://mlxsys.com/apollo/ApolloDiagram.pdf](http://mlxsys.com/apollo/ApolloDiagram.pdf)

There is also a template (couldn’t attach file because new user in this forum allowed only 2 links):

========== MAIN  
digraph G {  
graph [rankdir=LR,nodesep=1.0];  
node [shape=plaintext,fontsize=14];  
edge [arrowhead=crow];  
{{content}}  
}  
========== CLUSTER

subgraph cluster\_{{sequence}} { label = “{{name}}”;  
style=“rounded, filled”;  
fillcolor={{color}};  
node [style=filled,color=white];

{{content}}  
}

========== ENTITY

{{name}} [label=\<

  
  
{{fields}}  

| {{name}} |

\>]

========== MD\_RELATIONSHIP  
edge [style=solid]  
{{from}} → {{to}}

========== LOOKUP\_RELATIONSHIP  
edge [style=dashed]  
{{from}} → {{to}}

========== FIELD  
{{name}}{{fieldType}}

---

<div class="post-metadata">

### Author: ![Max\_TRNQ](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Max\_TRNQ](https://forum.graphviz.org/u/Max_TRNQ)
#### Post date: [August 31, 2021, 4:31pm UTC](https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800/2 "2021-08-31T16:31:23Z")

</div>

Maybe my solution is to simply increase width of the pdf page? How can I do that?

---

<div class="post-metadata">

### Author: ![jjlong](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/jjlong/32/887_2.png) [@jjlong](https://forum.graphviz.org/u/jjlong)
#### Post date: [August 31, 2021, 11:01pm UTC](https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800/3 "2021-08-31T23:01:38Z")

</div>

Try changing lines 2 and 3 as follows:

```
    graph [rankdir=TB nodesep=1.5 ranksep=1.5 splines="ortho"]; 
    node [shape=plaintext,fontsize=14 fontname=helvetica]; 

```

- `rankdir=TB` will change the layout from “Left to Right” to “Top to Bottom”.
- `nodesep=1.5` and `ranksep=1.5` will increase the horizontal and vertical spacing between nodes to 1.5 inches.
- `splines="ortho"` will use orthogonal edge routing (i.e. 90 degree angles)
- `fontname=helvetica` I think is clearer 🙂

I can’t upload the PDF file I created with these settings, but here is a bitmap preview:

 ![TBERD](https://global.discourse-cdn.com/graphviz/original/1X/25c5a2a33ab0bd9669df8d06e52373edce73fb34.png)

If you want to fine tune the horizontal and vertical spacing of the nodes using DOT:

- If `rankdir=TB` (or `BT`), change `ranksep` to vary the vertical spacing, and `nodesep` to vary the horizontal spacing.
- If `rankdir=LR` (or `RL`), change `nodesep` to vary the vertical spacing, and `ranksep` to vary the horizontal spacing.

Good luck,  
Jeff

---

<div class="post-metadata">

### Author: ![Max\_TRNQ](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Max\_TRNQ](https://forum.graphviz.org/u/Max_TRNQ)
#### Post date: [August 31, 2021, 11:24pm UTC](https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800/4 "2021-08-31T23:24:21Z")

</div>

Thank you so much. This helped me a lot. Is there a way to make the corners round, where lines are bending?

---

<div class="post-metadata">

### Author: ![jjlong](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/jjlong/32/887_2.png) [@jjlong](https://forum.graphviz.org/u/jjlong)
#### Post date: [August 31, 2021, 11:44pm UTC](https://forum.graphviz.org/t/how-to-make-this-diagram-clearer/800/5 "2021-08-31T23:44:31Z")

</div>

There is no way to round the corners of ortho edges like you can do to a node. You can, however, set `splines="polyline"` to have the edges drawn using line segments instead of curves.
