lee
November 17, 2021, 8:08am
1
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?
mark
November 17, 2021, 8:19am
2
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?
lee
November 17, 2021, 8:22am
3
Why I only can upload a .png file and .svg file,it can’t upload .dot file and .txt file?
lee
November 17, 2021, 8:32am
4
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
mark
November 17, 2021, 8:35am
5
Good point. I think I’ve found the fix for that in Discourse settings, should be able to upload text/dot/gv files now?
mark
November 17, 2021, 8:37am
7
Perhaps this setting was causing trouble too, I’ve bumped newuser max attachements from 0 to 3.
lee
November 17, 2021, 8:37am
8
thank you very much,it works now
mark
November 17, 2021, 8:43am
9
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">[<securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])>/new securibench.micro.B/0, <securibench.micro.B: java.io.PrintWriter getWriter()>/new java.io.PrintWriter/0], <java.io.PrintWriter: void print(java.lang.String)>/@parameter0</text>
</g>
<!-- [<securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])>/new securibench.micro.B/0, <securibench.micro.B: java.io.PrintWriter getWriter()>/new java.io.PrintWriter/0], <java.io.PrintWriter: void println(java.lang.Object)>/s#_837->[<securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])>/new securibench.micro.B/0, <securibench.micro.B: java.io.PrintWriter getWriter()>/new java.io.PrintWriter/0], <java.io.PrintWriter: void print(java.lang.String)>/@parameter0 -->
<g id="edge78" class="edge">
<title>[<securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])>/new securibench.micro.B/0, <securibench.micro.B: java.io.PrintWriter getWriter()>/new java.io.PrintWriter/0], <java.io.PrintWriter: void println(java.lang.Object)>/s#_837->[<securibench.micro.aliasing.Harness_Test: void main(java.lang.String[])>/new securibench.micro.B/0, <securibench.micro.B: java.io.PrintWriter getWriter()>/new java.io.PrintWriter/0], <java.io.PrintWriter: void print(java.lang.String)>/@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.
Here’s what a tiny section of the graph looks like to me:
lee
November 17, 2021, 8:48am
10
my version is 2.40.1,maybe that’s the reason I can’t display?
lee
November 17, 2021, 9:18am
11
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
lee
November 17, 2021, 9:22am
12
maybe,Can you tell me the your picture viewer and version?
lee
November 17, 2021, 9:40am
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
mark
November 17, 2021, 9:45am
14
I’m opening the svg file in latest Chrome for macOS
lee
November 17, 2021, 10:27am
15
OK,thank you!
Do you have any idea about this question?
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
mark
November 17, 2021, 11:11am
16
lee
November 17, 2021, 11:34am
17
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”
lee
November 18, 2021, 2:08pm
19
Thanks a lot!
I will have a test in your instruction