ruby-plot 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/plot_points.rb +12 -4
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
data/lib/plot_points.rb CHANGED
@@ -12,10 +12,7 @@ module RubyPlot
12
12
 
13
13
  min = Float::MAX
14
14
  max = -Float::MAX
15
- data = []
16
15
  (0..x_values.size-1).each do |i|
17
- data << y_values[i]
18
- data << x_values[i]
19
16
  min = [ min, x_values[i].min, y_values[i].min ].min
20
17
  max = [ max, x_values[i].max, y_values[i].max ].max
21
18
  end
@@ -44,7 +41,18 @@ module RubyPlot
44
41
  plot_points(path, title, x_lable, y_lable, names, x_values, y_values, log, x_range, y_range, true, true, false, false, false)
45
42
  end
46
43
 
47
- def self.accuracy_confidence_plot(path, title, x_lable, y_lable, names, x_values, y_values, y_range=nil, reverse_y=false)
44
+ def self.accuracy_confidence_plot(path, title, x_lable, y_lable, names, x_values, y_values, reverse_y=false) #y_range=nil,
45
+
46
+ min = Float::MAX
47
+ max = -Float::MAX
48
+ (0..x_values.size-1).each do |i|
49
+ min = [ min, y_values[i].min ].min
50
+ max = [ max, y_values[i].max ].max
51
+ end
52
+ border = (max-min)*0.1
53
+ min_border = min-border
54
+ max_border = max+border
55
+ y_range = [min_border, max_border]
48
56
 
49
57
  plot_points(path, title, x_lable, y_lable, names, x_values, y_values, false, nil, y_range, false, false, true, true, reverse_y)
50
58
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-plot
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Vorgrimmler