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

Below is my B.dot file:

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?

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?

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

I put in the github:

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

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

B.dot (468.4 KB)

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

image

thank you very much,it works now

I see things in my svg file:

$ 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

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

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


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

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

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

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

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

Use rankdir=LR
https://graphviz.org/docs/attrs/rankdir/

I don’t mean that


I mean if “A” area and “B” area can be up and down ,but not left and right
“A” and “B” are seperate

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)
    • 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”

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