# Why my dot file can't display?it only have about 400 nodes

**URL:** <https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910>\
**Category:** Uncategorized\
**Created:** [November 17, 2021, 8:08am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910 "2021-11-17T08:08:42Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 8:08am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/1 "2021-11-17T08:08:42Z")

</div>

Below is my B.dot file:

 ![B](https://global.discourse-cdn.com/graphviz/original/1X/0db9dd8226bf25f58fac025bc40ea84d516dcf04.jpeg)

I use command: dot -Tsvg B.dot \>B.svg  
then I see the B.svg file,I see nothing,I’m sure the format of the file is right,because when I delete most of them only left 10 lines,it displays OK.

Why?I think because the file is too large.but about 400 nodes,I think it is not too large.Can anyone tell me the reason and how to make it display nomally?

---

<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:** [November 17, 2021, 8:19am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/2 "2021-11-17T08:19:58Z")

</div>

That image doesn’t look like a dot file?

Can you share your dot file?

What do you mean by ‘can’t display’ – what happens when you try to display?

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 8:22am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/3 "2021-11-17T08:22:03Z")

</div>

Why I only can upload a .png file and .svg file,it can’t upload .dot file and .txt file?

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 8:32am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/4 "2021-11-17T08:32:00Z")

</div>

I put in the github:

[https://github.com/lyj18688610256/graphviz](https://github.com/lyj18688610256/graphviz)

Can you help me hava a look,thank you!  
" can’t display" means I see nothing in the B.svg file

---

<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:** [November 17, 2021, 8:35am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/5 "2021-11-17T08:35:43Z")

</div>

Good point. I think I’ve found the fix for that in Discourse settings, should be able to upload text/dot/gv files now?

![image](https://global.discourse-cdn.com/graphviz/original/1X/8146670b84adf6590604267a662999884b965816.png)

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 8:36am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/6 "2021-11-17T08:36:52Z")

</div>

[B.dot](https://forum.graphviz.org/uploads/short-url/5ZSqZJAPHFlTlzP9UpOzVOSGzKf.dot) (468.4 KB)

---

<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:** [November 17, 2021, 8:37am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/7 "2021-11-17T08:37:07Z")

</div>

Perhaps this setting was causing trouble too, I’ve bumped newuser max attachements from 0 to 3.

![image](https://global.discourse-cdn.com/graphviz/original/1X/7d52a330e5f0edb567602fd83862c491c648262a.png)

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 8:37am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/8 "2021-11-17T08:37:24Z")

</div>

thank you very much,it works now

---

<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:** [November 17, 2021, 8:43am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/9 "2021-11-17T08:43:50Z")

</div>

I see things in my svg file:

```auto
$ dot -V
dot - graphviz version 2.49.3 (20211023.0002)
$ cat ~/Downloads/B.dot | dot -Tsvg > ~/o.svg
$ tail ~/o.svg 
<text text-anchor="middle" x="83232.11" y="-14.3" font-family="Times,serif" font-size="14.00">[&lt;securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])&gt;/new securibench.micro.B/0, &lt;securibench.micro.B: java.io.PrintWriter getWriter()&gt;/new java.io.PrintWriter/0], &lt;java.io.PrintWriter: void print(java.lang.String)&gt;/@parameter0</text>
</g>
<!-- [&lt;securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])&gt;/new securibench.micro.B/0, &lt;securibench.micro.B: java.io.PrintWriter getWriter()&gt;/new java.io.PrintWriter/0], &lt;java.io.PrintWriter: void println(java.lang.Object)&gt;/s#_837&#45;&gt;[&lt;securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])&gt;/new securibench.micro.B/0, &lt;securibench.micro.B: java.io.PrintWriter getWriter()&gt;/new java.io.PrintWriter/0], &lt;java.io.PrintWriter: void print(java.lang.String)&gt;/@parameter0 -->
<g id="edge78" class="edge">
<title>[&lt;securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])&gt;/new securibench.micro.B/0, &lt;securibench.micro.B: java.io.PrintWriter getWriter()&gt;/new java.io.PrintWriter/0], &lt;java.io.PrintWriter: void println(java.lang.Object)&gt;/s#_837&#45;&gt;[&lt;securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])&gt;/new securibench.micro.B/0, &lt;securibench.micro.B: java.io.PrintWriter getWriter()&gt;/new java.io.PrintWriter/0], &lt;java.io.PrintWriter: void print(java.lang.String)&gt;/@parameter0</title>
<path fill="none" stroke="black" d="M83224.58,-71.7C83225.68,-63.98 83227.01,-54.71 83228.23,-46.11"/>
<polygon fill="black" stroke="black" points="83231.71,-46.5 83229.66,-36.1 83224.78,-45.51 83231.71,-46.5"/>
</g>
</g>
</svg>

```

The SVG graph is really wide and not very useful but there is data in there.

![o](https://global.discourse-cdn.com/graphviz/original/1X/c92f3f31828c4c6b3aec5790d6475a6e1e173f30.svg)

Here’s what a tiny section of the graph looks like to me:

 ![image](https://global.discourse-cdn.com/graphviz/original/1X/86746c1279052d79e27bbf71057da6b3d4b3fc4c.png)

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 8:48am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/10 "2021-11-17T08:48:48Z")

</div>

my version is 2.40.1,maybe that’s the reason I can’t display?

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 9:18am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/11 "2021-11-17T09:18:22Z")

</div>

![2](https://global.discourse-cdn.com/graphviz/original/1X/aec85a006c0318d744755c9725f38984aa1f76ff.png)  
Why I still see nothing,maybe there is something wrong with my picture viewer?  
here is my B.svg picture,Is there any content in the pic,I see nothing  
 ![B](https://global.discourse-cdn.com/graphviz/original/1X/6f1b6630e3c9785a7c156f9798da1b787f674067.svg)

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 9:22am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/12 "2021-11-17T09:22:57Z")

</div>

maybe,Can you tell me the your picture viewer and version?

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 9:40am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/13 "2021-11-17T09:40:06Z")

</div>

Thank you very much! I can display now  
But I feel it shows in the horizontal direction mainly,Can I make it show in Vertical direction mainly,that will have a betweer view for me

---

<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:** [November 17, 2021, 9:45am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/14 "2021-11-17T09:45:40Z")

</div>

I’m opening the svg file in latest Chrome for macOS

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 10:27am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/15 "2021-11-17T10:27:38Z")

</div>

OK,thank you!  
Do you have any idea about this question?

> [@Why my dot file can't display?it only have about 400 nodes](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/13):
>
> Thank you very much! I can display now But I feel it shows in the horizontal direction mainly,Can I make it show in Vertical direction mainly,that will have a betweer view for me

---

<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:** [November 17, 2021, 11:11am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/16 "2021-11-17T11:11:09Z")

</div>

Use rankdir=LR  
[https://graphviz.org/docs/attrs/rankdir/](https://graphviz.org/docs/attrs/rankdir/)

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 17, 2021, 11:34am UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/17 "2021-11-17T11:34:45Z")

</div>

I don’t mean that

 ![3](https://global.discourse-cdn.com/graphviz/original/1X/5a6fdba3c6d7821bb3958cc48ce28ca8742a86c5.png)  
I mean if “A” area and “B” area can be up and down ,but not left and right  
“A” and “B” are seperate

---

<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:** [November 17, 2021, 6:56pm UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/18 "2021-11-17T18:56:57Z")

</div>

A few suggestions to try to make things more vertical:

- change node shape to box (**node [shape=box]**). This will make the nodes a bit narrower.
- if possible, insert newlines in the label text, again to make the nodes narrower (and taller) (e.g. “line 1\nline2\nline more”)
- to get “area A” placed above “area B”
  - insert all the “area A” nodes into a new cluster subgraph (see [https://www.graphviz.org/pdf/dotguide.pdf](https://www.graphviz.org/pdf/dotguide.pdf))
  - insert all the “area B” nodes into another new cluster subgraph
  - add a new, invisible edge from a node at the bottom of “area A” to a node at the top of “area B”

---

<div class="post-metadata">

**Author:** ![lee](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lee](https://forum.graphviz.org/u/lee)\
**Post date:** [November 18, 2021, 2:08pm UTC](https://forum.graphviz.org/t/why-my-dot-file-cant-display-it-only-have-about-400-nodes/910/19 "2021-11-18T14:08:57Z")

</div>

Thanks a lot!  
I will have a test in your instruction
