gnutemplate 0.1.7 → 0.1.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eee2e328cf1aa0e13b0f9feb52243010ba7a1eb189e4399b20502c401badee5
4
- data.tar.gz: 4ddcbec7e5e1e461780d3a29367bd32d974a116c4cfa23c145c9b7ecf14a8bee
3
+ metadata.gz: 1cea3ed18f9e9e2f8ad94a45ecb03646d674bc6288edd75ca1e2893e0aa2796a
4
+ data.tar.gz: 8134a7d3552bbb526b660dc141d36ca2586205c8b09455268adbb8edff290f7f
5
5
  SHA512:
6
- metadata.gz: c06b4a8c302745e0f9e4d2f66febd917a470650f175ecd3f28927681c48b9f5106c65f12b60069fc11f78191757fc42c0c69c9a3a712b40cca3cdfa53b0c8bbc
7
- data.tar.gz: 1bb991e26f74a599caefce50169a1ec1ba6b9864bd27614f64f548c4105814921928da6321608e88e6fda574e50674d76e1ea949f2ddeaf6742f21ff877f8455
6
+ metadata.gz: f4dbd320d3d84d7f1e622d3c3c4714c39b80516749b6a9d73f2dd03e2d26d2de25dc856decdd412697fcc177e016276045bf34faf9c53c23a49075f3ef08dc9a
7
+ data.tar.gz: 11ee10695415e929c5301f276892fd59b7a1801596e453613c8d7faf833d7a2b35d983b5ff762f232aa1a82193285339967d56ec5046162d41d2947b0b9adaf8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gnutemplate
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8.1"
5
5
  end
data/lib/gnutemplate.rb CHANGED
@@ -186,9 +186,17 @@ module Gnutemplate
186
186
  .gsub(/,$/, ")")
187
187
  set xtics: xtics
188
188
 
189
- plot [*freqs[0], using: 2, w: :histogram, t: labels[0], fillcolor: "rgb \"#{colors[0 % 4]}\""],
190
- [*freqs[1], using: 2, w: :histogram, t: labels[1], fillcolor: "rgb \"#{colors[1 % 4]}\""],
191
- [*freqs[2], using: 2, w: :histogram, t: labels[2], fillcolor: "rgb \"#{colors[2 % 4]}\""]
189
+ labels ||= (0...(freqs.length)).map(&:to_s)
190
+
191
+ args = freqs.zip(labels).each_with_index.map do |(f, l), i|
192
+ [*f, using: 2, w: :histogram, t: labels[i], fillcolor: "rgb \"#{colors[i % 4]}\""]
193
+ end
194
+
195
+ plot *args
196
+ #plot [*freqs[0], using: 2, w: :histogram, t: labels[0], fillcolor: "rgb \"#{colors[0 % 4]}\""],
197
+ #[*freqs[1], using: 2, w: :histogram, t: labels[1], fillcolor: "rgb \"#{colors[1 % 4]}\""],
198
+ #[*freqs[2], using: 2, w: :histogram, t: labels[2], fillcolor: "rgb \"#{colors[2 % 4]}\""]
199
+
192
200
  end # Of if pileup..else
193
201
  end # Of Numo.noteplot do
194
202
 
@@ -267,9 +275,18 @@ module Gnutemplate
267
275
  .gsub(/,$/, ")")
268
276
  set xtics: xtics
269
277
 
270
- plot [*freqs[0], using: 2, w: :histogram, t: labels[0], fillcolor: "rgb \"#{colors[0 % 4]}\""],
271
- [*freqs[1], using: 2, w: :histogram, t: labels[1], fillcolor: "rgb \"#{colors[1 % 4]}\""],
272
- [*freqs[2], using: 2, w: :histogram, t: labels[2], fillcolor: "rgb \"#{colors[2 % 4]}\""]
278
+ labels ||= (0...(freqs.length)).map(&:to_s)
279
+
280
+ args = freqs.zip(labels).each_with_index.map do |(f, l), i|
281
+ [*f, using: 2, w: :histogram, t: labels[i], fillcolor: "rgb \"#{colors[i % 4]}\""]
282
+ end
283
+
284
+ plot *args
285
+
286
+ #plot [*freqs[0], using: 2, w: :histogram, t: labels[0], fillcolor: "rgb \"#{colors[0 % 4]}\""],
287
+ #[*freqs[1], using: 2, w: :histogram, t: labels[1], fillcolor: "rgb \"#{colors[1 % 4]}\""],
288
+ #[*freqs[2], using: 2, w: :histogram, t: labels[2], fillcolor: "rgb \"#{colors[2 % 4]}\""]
289
+
273
290
  end # Of if pileup..else
274
291
  end # Of Numo.noteplot do
275
292
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gnutemplate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - showata
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2023-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-gnuplot
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Templates of boxplot, histgram, etc.
41
+ description: Templates of boxplot, histogram, etc.
42
42
  email:
43
43
  - shun_yamaguchi_tc@live.jp
44
44
  executables: []