Coder Social home page Coder Social logo

README outdated? about rgl HOT 3 CLOSED

monora avatar monora commented on August 22, 2024
README outdated?

from rgl.

Comments (3)

monora avatar monora commented on August 22, 2024

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.

gorn avatar gorn commented on August 22, 2024

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.

michalvantuch avatar michalvantuch commented on August 22, 2024

It's the same for me. It generated only .dot file, but not image.

from rgl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.