/usr/share/doc/ruby-graphviz/examples/sample44.rb is in ruby-graphviz 1.2.3-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #!/usr/bin/ruby
$:.unshift( "../lib" );
require "graphviz"
g = nil
if ARGV[0]
g = GraphViz::new( "G", "path" => ARGV[0] )
else
g = GraphViz::new( "G" )
end
g["rankdir"] = "LR"
g.node["shape"] = "ellipse"
g.edge["arrowhead"] = "normal"
[
"box",
"boxbox",
"lbox",
"lboxlbox",
"rbox",
"rboxrbox",
"olbox",
"olboxolbox",
"orbox",
"orboxorbox",
"obox",
"oboxobox",
"crow",
"crowcrow",
"lcrow",
"lcrowlcrow",
"rcrow",
"rcrowrcrow",
"diamond",
"diamonddiamond",
"ldiamond",
"ldiamondldiamond",
"rdiamond",
"rdiamondrdiamond",
"oldiamond",
"oldiamondoldiamond",
"ordiamond",
"ordiamondordiamond",
"odiamond",
"odiamondodiamond",
"dot",
"dotdot",
"odot",
"odotodot",
"inv",
"invinv",
"linv",
"linvlinv",
"rinv",
"rinvrinv",
"olinv",
"olinvolinv",
"orinv",
"orinvorinv",
"oinv",
"oinvoinv",
"none",
"nonenone",
"normal",
"normalnormal",
"lnormal",
"lnormallnormal",
"rnormal",
"rnormalrnormal",
"olnormal",
"olnormalolnormal",
"ornormal",
"ornormalornormal",
"onormal",
"onormalonormal",
"tee",
"teetee",
"ltee",
"lteeltee",
"rtee",
"rteertee",
"vee",
"veevee",
"lvee",
"lveelvee",
"rvee",
"rveervee"
].each { |s|
p = "p_" << s
g.add_nodes( p, "shape" => "point" )
g.add_nodes( s )
g.add_edges( p, s, "arrowhead" => s )
}
g.output( :png => "#{$0}.png" )
|