gnutemplate 0.1.5 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 938bfcdda59a01c5b28de1b23a331dc0c460a7463fb1d29e5015529d30c44b38
4
- data.tar.gz: 074f1acb7782fe8144a2ccdf080c1585926cbe80ac0168f2a342dc74ce10f22c
3
+ metadata.gz: cfcba5163d0b3ee698d44dcedeb4bdbff59a78cc8d9664cffc9616382a78ccad
4
+ data.tar.gz: adb0cd61d35455dc9f2f0ffa099d52c3555d128940754e48061e1a64129236f3
5
5
  SHA512:
6
- metadata.gz: 2e1fe6e09cce907cf658a4565ce6e66bbdc49737d777ce2be168ecf8cf24abc1917b66155f6a391076ed1071ef9c1f008d280648e0130b0cc6fe538e154fafeb
7
- data.tar.gz: c634c9fb872802587644288d539601380522eb28093af6f045b9d1b43fffc4fd7a62c7eca587ee9635a705b30bbb84677e3ba34f5c5c0c79a5248d79e82d587d
6
+ metadata.gz: 812ddd1d2c4555ace77903223766260c81e2b933c223d3357fd698372e5c02d9a556e528e5afb659e62ef917403d1913209318e4c9d8db55623df79d49efc7d0
7
+ data.tar.gz: 2b33faa3748583196db76754df4142bc26835dbd59e1ff7f1e9e90ccc192b73476bf6ceb132b661b40f8e3013de5fa7ab2b5c29b5ad3a7d6b7ead1dc595123ee
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gnutemplate
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/gnutemplate.rb CHANGED
@@ -53,7 +53,7 @@ module Gnutemplate
53
53
  set :xtics, "rotate by 90"
54
54
  end
55
55
 
56
- xrange ||= (rows_min.to_a.flatten.compact.min)..(rows_max.to_a.flatten.compact.max)
56
+ xrange ||= (rows_min.map(&:to_a).flatten.compact.min)..(rows_max.map(&:to_a).flatten.compact.max)
57
57
  set xrange: xrange
58
58
  set :grid
59
59
  set style: :fill_solid
@@ -93,7 +93,7 @@ module Gnutemplate
93
93
  set :xtics, "rotate by 90"
94
94
  end
95
95
 
96
- xrange ||= (rows_min.to_a.flatten.compact.min)..(rows_max.to_a.flatten.compact.max)
96
+ xrange ||= (rows_min.map(&:to_a).flatten.compact.min)..(rows_max.map(&:to_a).flatten.compact.max)
97
97
  set xrange: xrange
98
98
  set :grid
99
99
  set style: :fill_solid
@@ -123,8 +123,8 @@ module Gnutemplate
123
123
  alpha_hex = (alpha * 256 / 100).to_s(16).upcase
124
124
  colors = ["##{alpha_hex}CC0000", "##{alpha_hex}00CC00", "##{alpha_hex}0000CC", "##{alpha_hex}888800"]
125
125
 
126
- xmax ||= data.to_a.flatten.max
127
- xmin ||= data.to_a.flatten.min
126
+ xmax ||= data.map(&:to_a).flatten.max
127
+ xmin ||= data.map(&:to_a).flatten.min
128
128
  freqs = data.map {|d| d.to_a.histogram(bins, min: xmin, max: xmax) }
129
129
  ymax ||= freqs.map{ _1[1] }.flatten.max * 1.1
130
130
 
@@ -205,8 +205,8 @@ module Gnutemplate
205
205
  alpha_hex = (alpha * 256 / 100).to_s(16).upcase
206
206
  colors = ["##{alpha_hex}CC0000", "##{alpha_hex}00CC00", "##{alpha_hex}0000CC", "##{alpha_hex}888800"]
207
207
 
208
- xmax ||= data.to_a.flatten.max
209
- xmin ||= data.to_a.flatten.min
208
+ xmax ||= data.map(&:to_a).flatten.max
209
+ xmin ||= data.map(&:to_a).flatten.min
210
210
  freqs = data.map {|d| d.to_a.histogram(bins, min: xmin, max: xmax) }
211
211
  ymax ||= freqs.map{ _1[1] }.flatten.max * 1.1
212
212
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gnutemplate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - showata