Closed ghost closed 13 years ago
Hi,
Here is the solution :
asm = GraphViz::new("My ASM")
# ...
asm.output( :png => "myAsm.png" )
You can see a lot of examples of usage in the examples' directory : https://github.com/glejeune/Ruby-Graphviz/tree/master/examples
I did try something like that
require "graphviz"
asm = GraphViz::new("My ASM") asm.output(:png => "myAsm.png")
/home/lewis/.rvm/gems/ruby-1.9.2-p180/gems/ruby-graphviz-0.9.21/lib/graphviz/utils.rb:74:in
output_from_command': Error from "/usr/bin/dot" -q1 -Tpng -omyAsm.png /tmp/graphviz.rb20110421-5540-14jks7: (RuntimeError) Error: /tmp/graphviz.rb20110421-5540-14jks7:1: syntax error near line 1 context: digraph My >>> ASM <<< { from /home/lewis/.rvm/gems/ruby-1.9.2-p180/gems/ruby-graphviz-0.9.21/lib/graphviz.rb:606:in
output'
from asm.rb:4:in `
shell returned 1
Is that a problem with the gem or my version of graphviz?
On 21/04/2011, glejeune reply@reply.github.com wrote:
Hi,
Here is the solution :
asm = GraphViz::new("My ASM") # ... asm.output( :png => "myAsm.png" )
You can see a lot of examples of usage in the examples' directory : https://github.com/glejeune/Ruby-Graphviz/tree/master/examples
Reply to this email directly or view it on GitHub: https://github.com/glejeune/Ruby-Graphviz/issues/22#comment_1038033
Ho!
Ok, this is because the graph ID have an space! This is a bug !
I'll correct it, in the meantime try with
asm = GraphViz::new("MyASM")
Greg
OK, I just push a correction. See sample 60 and 61 !
This correction will be in the 1.0 version.
Greg
Ah, works now.
Glad I could help you catch a bug:)
On 21/04/2011, glejeune reply@reply.github.com wrote:
Ho!
Ok, this is because the graph ID have an space! This is a bug !
I'll correct it, in the meantime try with
asm = GraphViz::new("MyASM")
Greg
Reply to this email directly or view it on GitHub: https://github.com/glejeune/Ruby-Graphviz/issues/22#comment_1038364
Yea! Thank you!
asm = GraphViz::new("My ASM", hOpts = {:output => "png"})
I tried all sorts of combinations to avoid this warning, but none of them worked.
Could you give an example of the "correct" way of doing this?