From: Horst Duchene Date: 2004-10-07T07:04:47+09:00 Subject: Re: Ruby Graph Library -- add a single knode Ralf M�ller wrote: > Moin Moin, > i'm usung the Ruby Graph Library (rgl.sourceforge.net) to scan function > libraries. If function A is used in function B, i add an edge to the > Graph from B to A. > To indicate, that a function isn't used in any other function, i would > just like to add a single knode without any edge. > I tried 'add_vertex' but no vertices are shown by dotty. > > Anybody, who can enlight me ? > This is a bug in rgl/dot.rb. If you use the latest CVS-Version (1.4), you should see isolated nodes. See this sample irb session: irb(main):001:0> require 'rgl/dot' irb(main):002:0> require 'rgl/adjacency' irb(main):003:0> dg = RGL::DirectedAdjacencyGraph.new # irb(main):004:0> dg.add_vertex 1 # irb(main):072:0> dg.print_dotted_on digraph RGL__DirectedAdjacencyGraph { label = "RGL__DirectedAdjacencyGraph" "1" [ fontsize = 8, label = "1" ] } # You see the isolated vertex in DOT formatted output. Therefore dotty should display it also: irb(main):073:0> dg.dotty Cheers Horst