Reputation: 1305
I have written the following code. When I run this file graph.dot file is generated
rather than graph.jpg.
I can't understand why so. Does any body have any idea?
My code is as:
require 'rgl/adjacency'
require 'rgl/dot'
dg=RGL::DirectedAdjacencyGraph[1,2,2,3,2,4,4,5,6,4,1,6]
dg.write_to_graphic_file('jpg')
Upvotes: 2
Views: 480
Reputation: 1152
RGL uses dot files as an intermediary format to produce image formats, it doesn't produce them itself. That is why you are seeing a graph.dot file.
If you have a dot binary available (part of the GraphViz package), rgl will invoke it to produce a graph.jpg file.
You can download the GraphViz package at the project homepage, or use homebrew (if you're on a mac) to install it with brew install graphviz
.
Upvotes: 6