scbi_plot 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/lib/scbi_plot.rb +1 -1
- data/lib/scbi_plot/histogram.rb +7 -1
- data/lib/scbi_plot/lines.rb +4 -0
- data/lib/scbi_plot/plot.rb +18 -0
- metadata +2 -2
data/History.txt
CHANGED
data/lib/scbi_plot.rb
CHANGED
data/lib/scbi_plot/histogram.rb
CHANGED
data/lib/scbi_plot/lines.rb
CHANGED
data/lib/scbi_plot/plot.rb
CHANGED
@@ -23,6 +23,24 @@ module ScbiPlot
|
|
23
23
|
class Plot
|
24
24
|
|
25
25
|
attr_accessor :title,:file_name,:x_label,:y_label,:x_limit,:x, :y, :line_width, :x_range, :y_range
|
26
|
+
|
27
|
+
# Cross-platform way of finding an executable in the $PATH.
|
28
|
+
#
|
29
|
+
# which('ruby') #=> /usr/bin/ruby
|
30
|
+
def which(cmd)
|
31
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
|
32
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
33
|
+
exts.each { |ext|
|
34
|
+
exe = "#{path}/#{cmd}#{ext}"
|
35
|
+
return exe if File.executable? exe
|
36
|
+
}
|
37
|
+
end
|
38
|
+
return nil
|
39
|
+
end
|
40
|
+
|
41
|
+
def gnu_plot_installed?
|
42
|
+
return which('gnuplot')
|
43
|
+
end
|
26
44
|
|
27
45
|
def initialize(file_name,title=nil)
|
28
46
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: scbi_plot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Dario Guerrero Fernandez
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-14 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gnuplot
|