plotrobber 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plotrobber/version.rb +1 -1
- data/lib/plotrobber.rb +3 -4
- metadata +2 -2
data/lib/plotrobber/version.rb
CHANGED
data/lib/plotrobber.rb
CHANGED
@@ -4,13 +4,12 @@ require 'gnuplot'
|
|
4
4
|
require 'tempfile'
|
5
5
|
|
6
6
|
def plotting(&blk)
|
7
|
-
|
8
|
-
@@gp = gp
|
9
|
-
blk[gp]
|
10
|
-
end
|
7
|
+
IO.popen('gnuplot -preserve', 'w+') {|io| @@gp = io; blk[io] }
|
11
8
|
end
|
12
9
|
|
13
10
|
def plot(filename=nil, &blk)
|
11
|
+
@@gp.puts 'reset'
|
12
|
+
|
14
13
|
Gnuplot::Plot.new(@@gp) do |p|
|
15
14
|
p.magic_terminal(filename) if filename
|
16
15
|
p.instance_exec(p, &blk)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plotrobber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gnuplot
|