Comments (3)
Hm, could you provide more information. What ruby and RGL version do you use? Here is my example session:
$ irb
irb(main):001:0> require 'rgl/adjacency'
=> true
irb(main):002:0> dg=RGL::DirectedAdjacencyGraph[1,2 ,2,3 ,2,4, 4,5, 6,4, 1,6]
=> (1-2)(1-6)(2-3)(2-4)(4-5)(6-4)
irb(main):003:0> require 'rgl/dot'
=> true
irb(main):004:0> dg.write_to_graphic_file('jpg')
=> "graph.jpg"
irb(main):006:0* RGL_VERSION
=> "0.5.1"
irb(main):007:0> dg.edges.sort.to_s
=> "[(1-2), (1-6), (2-3), (2-4), (4-5), (6-4)]"
exit
$ ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
from rgl.
Here is what i get
$ irb
irb(main):001:0> require 'rgl/adjacency'
=> true
irb(main):002:0> dg=RGL::DirectedAdjacencyGraph[1,2 ,2,3 ,2,4, 4,5, 6,4, 1,6]
=> #<RGL::DirectedAdjacencyGraph:0x00000000e9b470 @edgelist_class=Set, @vertices_dict={1=>#<Set: {2, 6}>, 2=>#<Set: {3, 4}>, 3=>#<Set: {}>, 4=>#<Set: {5}>, 5=>#<Set: {}>, 6=>#<Set: {4}>}>
irb(main):003:0> require 'rgl/dot'
=> true
irb(main):004:0> dg.write_to_graphic_file('jpg')
=> "graph.jpg"
irb(main):005:0> RGL_VERSION
=> "0.5.1"
irb(main):006:0> dg.edges.sort.to_s
=> "[#<RGL::Edge::DirectedEdge:0x00000000c29930 @source=1, @target=2>, #<RGL::Edge::DirectedEdge:0x00000000c29868 @source=1, @target=6>, #<RGL::Edge::DirectedEdge:0x00000000c29778 @source=2, @target=3>, #<RGL::Edge::DirectedEdge:0x00000000c29728 @source=2, @target=4>, #<RGL::Edge::DirectedEdge:0x00000000c29520 @source=4, @target=5>, #<RGL::Edge::DirectedEdge:0x00000000c29368 @source=6, @target=4>]"
irb(main):007:0> exit
$ ruby --version
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
$
and the graph.dit is generated in the current directory (but no graph.jpg).
PS: sidenote - also have a look at https://github.com/monora/rgl it does not show pistures, i.e. link https://github.com/monora/rgl/blob/master/images/example.jpg is broken
from rgl.
It's the same for me. It generated only .dot file, but not image.
from rgl.
Related Issues (20)
- Automate release process HOT 4
- Fix links in README link section
- Fix link to LICENSE in CONTRIBUTING.md
- dependency on pairing_heap would downgrade from v3.0.1 to v0.3.0 HOT 1
- Gem is not loading HOT 2
- set_to_begin incorrect for graph iterator
- Unclear how to use bellman_ford_shortest_paths method HOT 2
- The License of the Project is Unclear HOT 6
- how i can use this in laravel ? HOT 2
- `depth_first_search` Doesn't work HOT 1
- Remove superfluous :GRAY assignment in depth first visit
- Support Ruby 3.2
- doc: Fix bad badge for codeclimate
- Fix wrong module and class comments in generated documentation
- How can I add a subgraph? HOT 2
- each_in_neighbor() does not call a passed block
- each_in_neighbor() raises exception on unconnected vertices
- Refactor edge/vertex settings to no longer require individual options initialization HOT 1
- undefined method `set_vertex_options' HOT 7
- calling require inside a mehtod is causing memory bloat if this method is called multiple times. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rgl.