| 1 |
require 'nyaplot' |
| 2 |
require 'nyaplot3d' |
| 3 |
|
| 4 |
colors = Nyaplot::Colors.qual |
| 5 |
|
| 6 |
f = File.open(ARGV[0], "r") |
| 7 |
x=[] |
| 8 |
y=[] |
| 9 |
x_s=[] |
| 10 |
y_s=[] |
| 11 |
f.each_line do |li| |
| 12 |
m = /\$l.shadow@(.*) -> (.*)/.match(li) |
| 13 |
if m |
| 14 |
x.push(Integer(m[1])) |
| 15 |
y.push(Integer(m[2])) |
| 16 |
end |
| 17 |
m = /\$l@(.*) -> (.*)/.match(li) |
| 18 |
if m |
| 19 |
x_s.push(Integer(m[1])) |
| 20 |
y_s.push(Integer(m[2])) |
| 21 |
end |
| 22 |
|
| 23 |
end |
| 24 |
|
| 25 |
|
| 26 |
plot1 = Nyaplot::Plot.new |
| 27 |
sc1 = plot1.add(:scatter, x, y) |
| 28 |
plot2 = Nyaplot::Plot.new |
| 29 |
sc2 = plot2.add(:scatter, x_s, y_s) |
| 30 |
|
| 31 |
|
| 32 |
frame = Nyaplot::Frame.new |
| 33 |
frame.add(plot1) |
| 34 |
frame.add(plot2) |
| 35 |
frame.export_html("multiple_pane.html") |