numo-gnuplot 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/numo/gnuplot.rb +13 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39a3ebbe14ce683f9921fa70f40e60b398f76678
|
4
|
+
data.tar.gz: c2508063acf8dca872ab6c53bd5ae075c379681f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5dee4a5e360d41ea5804845a76b081fa6f8e1c13bd134538a3b618861095b534cb5dad8d844be79b7dc0846703c9bba38c14bad20e65a748e9461531402098f
|
7
|
+
data.tar.gz: 63e12b30cb0e739a6fc5cffb2a3a99300ff3160148be08f1e7c10929699d5c1ec17b0400baf75128137d4e2f0b9761a6a25ee92f83c34a48b6f87f4cc92f6b9a
|
data/lib/numo/gnuplot.rb
CHANGED
@@ -11,7 +11,7 @@ module Numo
|
|
11
11
|
|
12
12
|
class Gnuplot
|
13
13
|
|
14
|
-
VERSION = "0.1.
|
14
|
+
VERSION = "0.1.3"
|
15
15
|
POOL = []
|
16
16
|
DATA_FORMAT = "%.5g"
|
17
17
|
|
@@ -24,12 +24,19 @@ class Gnuplot
|
|
24
24
|
def initialize(gnuplot_command="gnuplot")
|
25
25
|
@history = []
|
26
26
|
@debug = false
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
r0,@iow = IO.pipe
|
28
|
+
@ior,w2 = IO.pipe
|
29
|
+
IO.popen(gnuplot_command,:in=>r0,:err=>w2)
|
30
|
+
r0.close
|
31
|
+
w2.close
|
32
32
|
@gnuplot_version = send_cmd("print GPVAL_VERSION")[0].chomp
|
33
|
+
if /\.(\w+)$/ =~ (filename = ENV['NUMO_GNUPLOT_OUTPUT'])
|
34
|
+
ext = $1
|
35
|
+
ext = KNOWN_EXT[ext] || ext
|
36
|
+
opts = ENV['NUMO_GNUPLOT_OPTION'] || ''
|
37
|
+
set terminal:[ext,opts]
|
38
|
+
set output:filename
|
39
|
+
end
|
33
40
|
end
|
34
41
|
|
35
42
|
attr_reader :history
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numo-gnuplot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro TANAKA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|