ruby-gr 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -20
- data/lib/gr/plot.rb +139 -110
- data/lib/gr_commons/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29a78c0f4c5e3ab3afdc4245ab4dd6d9ce7d6c4f38638901a93487e366c219c6
|
4
|
+
data.tar.gz: 72f3fb64d9508c28338214583b185c041362f3e8b31a138ab9990cba4669b27a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0b0766224a375477115ff004467b4b5196689bff28846efabd31f078bd7f36d00a5f736e088f0a8333327d9eb6f8d80e398365e79d26e99f6303e2975b66c1c
|
7
|
+
data.tar.gz: 69dbc6bc3859bad4e3d67c2d2131b48c41c659e79c2f9b8b0f3250fb15cb94a3c29cc0b10c217fd1b354784ac969f2d82d9be256f59e5f0224d4d597b94ea131
|
data/README.md
CHANGED
@@ -22,28 +22,22 @@
|
|
22
22
|
![face](https://i.imgur.com/uLCKi2r.png)
|
23
23
|
![shade](https://i.imgur.com/VJmS3EQ.png)
|
24
24
|
|
25
|
-
:bar_chart: [GR framework](https://github.com/sciapp/gr) -
|
25
|
+
:bar_chart: [GR framework](https://github.com/sciapp/gr) - powerful visualization library - for Ruby
|
26
26
|
|
27
27
|
## Installation
|
28
28
|
|
29
29
|
GR.rb supports Ruby 2.4+.
|
30
30
|
|
31
|
-
[
|
32
|
-
|
33
|
-
Set environment variable GRDIR, if you have not already done.
|
31
|
+
First, [install GR](#gr-installation). Next, set environment variable `GRDIR`.
|
34
32
|
|
35
33
|
```sh
|
36
34
|
export GRDIR="/your/path/to/gr"
|
37
35
|
```
|
38
36
|
|
39
|
-
Add this line to your application's Gemfile:
|
40
|
-
|
41
37
|
```sh
|
42
|
-
gem
|
38
|
+
gem install ruby-gr
|
43
39
|
```
|
44
40
|
|
45
|
-
GR3 and GR::Plot require [numo-narray](https://github.com/ruby-numo/numo-narray).
|
46
|
-
|
47
41
|
## Quick Start
|
48
42
|
|
49
43
|
<p align="center">
|
@@ -81,15 +75,15 @@ GR.plot(
|
|
81
75
|
)
|
82
76
|
```
|
83
77
|
|
84
|
-
Save
|
78
|
+
Save in PNG format.
|
85
79
|
|
86
80
|
```ruby
|
87
81
|
GR.savefig("figure.png")
|
88
82
|
```
|
89
83
|
|
90
|
-
##
|
84
|
+
## API Overview
|
91
85
|
|
92
|
-
There are two
|
86
|
+
There are two different approaches to plotting with GR.rb. One way is to call Matlab-like APIs. The other is to call GR/GR3 native functions. We are planning to prepare a more object-oriented interface based on [GRUtils.jl](https://github.com/heliosdrm/GRUtils.jl) in the future.
|
93
87
|
|
94
88
|
#### GR::Plot - A simple, matlab-style API.
|
95
89
|
|
@@ -126,6 +120,8 @@ List of vailable functions. See [GR.rb Wiki](https://github.com/red-data-tools/G
|
|
126
120
|
|
127
121
|
#### GR - A module for calling native GR functions.
|
128
122
|
|
123
|
+
2-D Plots and common 3-D Plots.
|
124
|
+
|
129
125
|
```ruby
|
130
126
|
require 'gr'
|
131
127
|
|
@@ -136,6 +132,8 @@ GR.setwindow(0.0, 20.0, 0.0, 20.0)
|
|
136
132
|
|
137
133
|
#### GR3 - A module for calling native GR3 functions.
|
138
134
|
|
135
|
+
Complex 3D scenes.
|
136
|
+
|
139
137
|
```ruby
|
140
138
|
require 'gr3'
|
141
139
|
|
@@ -143,8 +141,6 @@ require 'gr3'
|
|
143
141
|
GR3.cameralookat(-3, 2, -2, 0, 0, 0, 0, 0, -1)
|
144
142
|
```
|
145
143
|
|
146
|
-
* GR.rb can be used in Jupyter Notebook.
|
147
|
-
|
148
144
|
## Documentation
|
149
145
|
|
150
146
|
- [GR.rb Wiki](https://github.com/red-data-tools/GR.rb/wiki)
|
@@ -167,26 +163,26 @@ export GRDIR="your/path/to/gr"
|
|
167
163
|
|
168
164
|
### Using your package manager
|
169
165
|
|
170
|
-
* The third party GR packages for Mac, Linux and Windows (for advanced users)
|
171
|
-
* If you find
|
166
|
+
* The third party GR packages for Mac, Linux and Windows are available (for advanced users).
|
167
|
+
* If you find any problem, please report the issue [here](https://github.com/red-data-tools/GR.rb/issues).
|
172
168
|
|
173
|
-
#### Mac
|
169
|
+
#### Mac - Homebrew
|
174
170
|
|
175
171
|
```sh
|
176
172
|
brew install libgr
|
177
173
|
```
|
178
174
|
|
179
|
-
Set environment variable GRDIR
|
175
|
+
Set environment variable `GRDIR`.
|
180
176
|
|
181
177
|
```sh
|
182
178
|
export GRDIR=$(brew --prefix libgr)
|
183
179
|
```
|
184
180
|
|
185
|
-
#### Linux
|
181
|
+
#### Linux - APT Yum
|
186
182
|
|
187
183
|
[packages.red-data-tools.org](https://github.com/red-data-tools/packages.red-data-tools.org) provides `libgr-dev` and `libgr3-dev`.
|
188
184
|
|
189
|
-
#### Windows
|
185
|
+
#### Windows - MSYS2
|
190
186
|
|
191
187
|
If you are using Rubyinstaller, pacman will automatically install [mingw-w64-gr](https://packages.msys2.org/base/mingw-w64-gr) when the gem is installed.
|
192
188
|
|
data/lib/gr/plot.rb
CHANGED
@@ -38,59 +38,58 @@ module GR
|
|
38
38
|
|
39
39
|
# Keyword options conform to GR.jl.
|
40
40
|
KW_ARGS = %i[accelerate algorithm alpha ax backgroundcolor barwidth baseline
|
41
|
-
clabels clear clim color colormap crange figsize horizontal
|
41
|
+
clabels clear clim color colormap crange figsize grid horizontal
|
42
42
|
isovalue kind label labels levels location nbins ratio rotation
|
43
43
|
scale size spec subplot tilt title update xaxis xflip xform
|
44
|
-
xlabel xlim xlog xrange yaxis yflip ylabel ylim ylog
|
45
|
-
yrange viewport vp where window zaxis zlabel zlim
|
44
|
+
xlabel xlim xlog xrange xticks yaxis yflip ylabel ylim ylog
|
45
|
+
zflip yrange yticks viewport vp where window zaxis zlabel zlim
|
46
|
+
zlog zrange zticks].freeze
|
46
47
|
|
47
48
|
@last_plot = nil
|
48
49
|
class << self
|
49
50
|
attr_accessor :last_plot
|
50
51
|
end
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
attr_accessor :args, :kvs, :scheme
|
54
|
+
|
55
|
+
def initialize(*raw_args)
|
56
|
+
@kvs = raw_args.last.is_a?(Hash) ? raw_args.pop : {}
|
57
|
+
@args = plot_args(raw_args) # method name is the same as Julia/Python
|
58
|
+
|
58
59
|
# Check keyword options.
|
59
|
-
|
60
|
-
warn "Unknown keyword: #{k}" unless KW_ARGS.include? k
|
61
|
-
end
|
60
|
+
kvs.each_key { |k| warn "Unknown keyword: #{k}" unless KW_ARGS.include? k }
|
62
61
|
|
63
62
|
# label(singular form) is a original keyword arg which GR.jl does not have.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
63
|
+
kvs[:labels] ||= [kvs[:label]] if kvs.has_key? :label
|
64
|
+
|
65
|
+
# Don't use || because we need to tell `false` from `nil`
|
66
|
+
kvs[:size] = [600, 450] unless kvs.has_key? :size
|
67
|
+
kvs[:ax] = false unless kvs.has_key? :ax
|
68
|
+
kvs[:subplot] = [0, 1, 0, 1] unless kvs.has_key? :subplot
|
69
|
+
kvs[:clear] = true unless kvs.has_key? :clear
|
70
|
+
kvs[:update] = true unless kvs.has_key? :update
|
71
|
+
|
72
|
+
@scheme = 0
|
73
73
|
@background = 0xffffff
|
74
|
-
@handle
|
74
|
+
# @handle = nil # This variable will be used in gr_meta
|
75
|
+
|
75
76
|
self.class.last_plot = self
|
76
77
|
end
|
77
|
-
attr_accessor :args, :kvs, :scheme
|
78
78
|
|
79
79
|
def set_viewport(kind, subplot)
|
80
80
|
mwidth, mheight, width, height = GR.inqdspsize
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
end
|
92
|
-
viewport = [0, 0, 0, 0]
|
81
|
+
dpi = width / mwidth * 0.0254
|
82
|
+
w, h = if kvs[:figsize]
|
83
|
+
[(0.0254 * width * kvs[:figsize][0] / mwidth),
|
84
|
+
(0.0254 * height * kvs[:figsize][1] / mheight)]
|
85
|
+
elsif dpi > 200
|
86
|
+
kvs[:size].map { |i| i * dpi / 100 }
|
87
|
+
else
|
88
|
+
kvs[:size]
|
89
|
+
end
|
90
|
+
|
93
91
|
vp = subplot.clone
|
92
|
+
|
94
93
|
if w > h
|
95
94
|
ratio = h / w.to_f
|
96
95
|
msize = mwidth * w / width
|
@@ -106,6 +105,7 @@ module GR
|
|
106
105
|
vp[0] *= ratio
|
107
106
|
vp[1] *= ratio
|
108
107
|
end
|
108
|
+
|
109
109
|
if %i[wireframe surface plot3 scatter3 trisurf volume].include?(kind)
|
110
110
|
extent = [vp[1] - vp[0], vp[3] - vp[2]].min
|
111
111
|
vp1 = 0.5 * (vp[0] + vp[1] - extent)
|
@@ -115,10 +115,12 @@ module GR
|
|
115
115
|
else
|
116
116
|
vp1, vp2, vp3, vp4 = vp
|
117
117
|
end
|
118
|
-
|
119
|
-
viewport
|
120
|
-
|
121
|
-
|
118
|
+
|
119
|
+
viewport = [vp1 + 0.125 * (vp2 - vp1),
|
120
|
+
vp1 + 0.925 * (vp2 - vp1),
|
121
|
+
vp3 + 0.125 * (vp4 - vp3),
|
122
|
+
vp3 + 0.925 * (vp4 - vp3)]
|
123
|
+
|
122
124
|
if %i[contour contourf hexbin heatmap nonuniformheatmap polarheatmap
|
123
125
|
surface trisurf volume].include?(kind)
|
124
126
|
viewport[1] -= 0.1
|
@@ -132,11 +134,11 @@ module GR
|
|
132
134
|
end
|
133
135
|
end
|
134
136
|
|
135
|
-
GR.setviewport(viewport
|
137
|
+
GR.setviewport(*viewport)
|
136
138
|
|
137
139
|
kvs[:viewport] = viewport
|
138
|
-
kvs[:vp]
|
139
|
-
kvs[:ratio]
|
140
|
+
kvs[:vp] = vp
|
141
|
+
kvs[:ratio] = ratio
|
140
142
|
|
141
143
|
if kvs[:backgroundcolor]
|
142
144
|
GR.savestate
|
@@ -166,14 +168,15 @@ module GR
|
|
166
168
|
def set_window(kind)
|
167
169
|
scale = 0
|
168
170
|
unless %i[polar polarhist polarheatmap].include?(kind)
|
169
|
-
scale |= GR::OPTION_X_LOG
|
170
|
-
scale |= GR::OPTION_Y_LOG
|
171
|
-
scale |= GR::OPTION_Z_LOG
|
171
|
+
scale |= GR::OPTION_X_LOG if kvs[:xlog]
|
172
|
+
scale |= GR::OPTION_Y_LOG if kvs[:ylog]
|
173
|
+
scale |= GR::OPTION_Z_LOG if kvs[:zlog]
|
172
174
|
scale |= GR::OPTION_FLIP_X if kvs[:xflip]
|
173
175
|
scale |= GR::OPTION_FLIP_Y if kvs[:yflip]
|
174
176
|
scale |= GR::OPTION_FLIP_Z if kvs[:zflip]
|
175
177
|
end
|
176
178
|
kvs[:scale] = scale
|
179
|
+
|
177
180
|
if kvs.has_key?(:panzoom)
|
178
181
|
xmin, xmax, ymin, ymax = GR.panzoom(*kvs[:panzoom])
|
179
182
|
kvs[:xrange] = [xmin, xmax]
|
@@ -185,65 +188,74 @@ module GR
|
|
185
188
|
major_count = %i[wireframe surface plot3 scatter3 polar polarhist
|
186
189
|
polarheatmap trisurf volume].include?(kind) ? 2 : 5
|
187
190
|
|
191
|
+
kvs[:xticks] = [kvs[:xticks], major_count] if kvs[:xticks].is_a? Numeric
|
192
|
+
kvs[:yticks] = [kvs[:yticks], major_count] if kvs[:yticks].is_a? Numeric
|
193
|
+
kvs[:zticks] = [kvs[:zticks], major_count] if kvs[:zticks].is_a? Numeric
|
194
|
+
|
188
195
|
xmin, xmax = kvs[:xrange]
|
189
|
-
if (
|
190
|
-
xmin
|
191
|
-
|
192
|
-
xtick, majorx = kvs[:xticks]
|
193
|
-
else
|
194
|
-
majorx = major_count
|
195
|
-
xtick = GR.tick(xmin, xmax) / majorx
|
196
|
-
end
|
197
|
-
else
|
198
|
-
xtick = majorx = 1
|
196
|
+
if %i[heatmap polarheatmap].include?(kind) && kvs.has_key?(:xlim)
|
197
|
+
xmin -= 0.5
|
198
|
+
xmax += 0.5
|
199
199
|
end
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
200
|
+
xtick, majorx = if (scale & GR::OPTION_X_LOG) == 0
|
201
|
+
unless %i[heatmap polarheatmap].include?(kind)
|
202
|
+
unless kvs.has_key?(:xlim)
|
203
|
+
xmin, xmax = GR.adjustlimits(xmin, xmax) unless kvs[:panzoom]
|
204
|
+
end
|
205
|
+
end
|
206
|
+
if kvs.has_key?(:xticks)
|
207
|
+
kvs[:xticks]
|
208
|
+
else
|
209
|
+
[GR.tick(xmin, xmax) / major_count, major_count]
|
210
|
+
end
|
211
|
+
else
|
212
|
+
[1, 1]
|
213
|
+
end
|
214
|
+
xorg = (scale & GR::OPTION_FLIP_X) == 0 ? [xmin, xmax] : [xmax, xmin]
|
205
215
|
kvs[:xaxis] = xtick, xorg, majorx
|
206
216
|
|
207
217
|
ymin, ymax = kvs[:yrange]
|
208
|
-
if kind
|
209
|
-
ymin
|
218
|
+
if %i[heatmap polarheatmap].include?(kind) && kvs.has_key?(:ylim)
|
219
|
+
ymin -= 0.5
|
220
|
+
ymax += 0.5
|
210
221
|
end
|
211
|
-
if
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
majory = major_count
|
217
|
-
ytick = GR.tick(ymin, ymax) / majory
|
222
|
+
if kind == :hist
|
223
|
+
if kvs[:horizontal] && !kvs.has_key?(:xlim)
|
224
|
+
xmin = (scale & GR::OPTION_X_LOG) == 0 ? 0 : 1
|
225
|
+
elsif !kvs.has_key?(:ylim)
|
226
|
+
ymin = (scale & GR::OPTION_Y_LOG) == 0 ? 0 : 1
|
218
227
|
end
|
219
|
-
else
|
220
|
-
ytick = majory = 1
|
221
228
|
end
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
229
|
+
ytick, majory = if (scale & GR::OPTION_Y_LOG) == 0
|
230
|
+
unless %i[heatmap polarheatmap].include?(kind)
|
231
|
+
unless kvs.has_key?(:ylim)
|
232
|
+
ymin, ymax = GR.adjustlimits(ymin, ymax) unless kvs[:panzoom]
|
233
|
+
end
|
234
|
+
end
|
235
|
+
if kvs.has_key?(:yticks)
|
236
|
+
kvs[:yticks]
|
237
|
+
else
|
238
|
+
[GR.tick(ymin, ymax) / major_count, major_count]
|
239
|
+
end
|
240
|
+
else
|
241
|
+
[1, 1]
|
242
|
+
end
|
243
|
+
yorg = (scale & GR::OPTION_FLIP_Y) == 0 ? [ymin, ymax] : [ymax, ymin]
|
227
244
|
kvs[:yaxis] = ytick, yorg, majory
|
228
245
|
|
229
246
|
if %i[wireframe surface plot3 scatter3 trisurf volume].include?(kind)
|
230
247
|
zmin, zmax = kvs[:zrange]
|
231
|
-
if (scale & GR::OPTION_Z_LOG) == 0
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
zorg = if (scale & GR::OPTION_FLIP_Z) == 0
|
243
|
-
[zmin, zmax]
|
244
|
-
else
|
245
|
-
[zmax, zmin]
|
246
|
-
end
|
248
|
+
ztick, majorz = if (scale & GR::OPTION_Z_LOG) == 0
|
249
|
+
zmin, zmax = GR.adjustlimits(zmin, zmax) if kvs.has_key?(:zlim)
|
250
|
+
if kvs.has_key?(:zticks)
|
251
|
+
kvs[:zticks]
|
252
|
+
else
|
253
|
+
[GR.tick(zmin, zmax) / major_count, major_count]
|
254
|
+
end
|
255
|
+
else
|
256
|
+
[1, 1]
|
257
|
+
end
|
258
|
+
zorg = (scale & GR::OPTION_FLIP_Z) == 0 ? [zmin, zmax] : [zmax, zmin]
|
247
259
|
kvs[:zaxis] = ztick, zorg, majorz
|
248
260
|
end
|
249
261
|
|
@@ -255,7 +267,7 @@ module GR
|
|
255
267
|
end
|
256
268
|
if %i[wireframe surface plot3 scatter3 trisurf volume].include?(kind)
|
257
269
|
rotation = kvs[:rotation] || 40
|
258
|
-
tilt
|
270
|
+
tilt = kvs[:tilt] || 70
|
259
271
|
GR.setspace(zmin, zmax, rotation, tilt)
|
260
272
|
end
|
261
273
|
|
@@ -655,14 +667,26 @@ module GR
|
|
655
667
|
GR.polymarker(x, y)
|
656
668
|
|
657
669
|
when :hist
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
670
|
+
if kvs[:horizontal]
|
671
|
+
xmin = kvs[:window][0]
|
672
|
+
x.length.times do |i|
|
673
|
+
GR.setfillcolorind(989)
|
674
|
+
GR.setfillintstyle(GR::INTSTYLE_SOLID)
|
675
|
+
GR.fillrect(xmin, x[i], y[i], y[i + 1])
|
676
|
+
GR.setfillcolorind(1)
|
677
|
+
GR.setfillintstyle(GR::INTSTYLE_HOLLOW)
|
678
|
+
GR.fillrect(xmin, x[i], y[i], y[i + 1])
|
679
|
+
end
|
680
|
+
else
|
681
|
+
ymin = kvs[:window][2]
|
682
|
+
y.length.times do |i|
|
683
|
+
GR.setfillcolorind(989)
|
684
|
+
GR.setfillintstyle(GR::INTSTYLE_SOLID)
|
685
|
+
GR.fillrect(x[i], x[i + 1], ymin, y[i])
|
686
|
+
GR.setfillcolorind(1)
|
687
|
+
GR.setfillintstyle(GR::INTSTYLE_HOLLOW)
|
688
|
+
GR.fillrect(x[i], x[i + 1], ymin, y[i])
|
689
|
+
end
|
666
690
|
end
|
667
691
|
|
668
692
|
when :polarhist
|
@@ -1057,7 +1081,8 @@ module GR
|
|
1057
1081
|
args.each do |x, y, z, c|
|
1058
1082
|
if x
|
1059
1083
|
if scale & GR::OPTION_X_LOG != 0
|
1060
|
-
|
1084
|
+
# duck typing for NArray
|
1085
|
+
x = x.map { |v| v > 0 ? v : Float::NAN }
|
1061
1086
|
end
|
1062
1087
|
x0, x1 = x.minmax
|
1063
1088
|
xmin = [x0, xmin].min
|
@@ -1068,7 +1093,7 @@ module GR
|
|
1068
1093
|
end
|
1069
1094
|
if y
|
1070
1095
|
if scale & GR::OPTION_Y_LOG != 0
|
1071
|
-
y.map
|
1096
|
+
y = y.map { |v| v > 0 ? v : Float::NAN }
|
1072
1097
|
end
|
1073
1098
|
y0, y1 = y.minmax
|
1074
1099
|
ymin = [y0, ymin].min
|
@@ -1079,7 +1104,7 @@ module GR
|
|
1079
1104
|
end
|
1080
1105
|
if z
|
1081
1106
|
if scale & GR::OPTION_Z_LOG != 0
|
1082
|
-
z.map
|
1107
|
+
z = z.map { |v| v > 0 ? v : Float::NAN }
|
1083
1108
|
end
|
1084
1109
|
z0, z1 = z.minmax
|
1085
1110
|
zmin = [z0, zmin].min
|
@@ -1293,11 +1318,15 @@ module GR
|
|
1293
1318
|
end
|
1294
1319
|
|
1295
1320
|
# (Plot) Draw a histogram.
|
1296
|
-
def histogram(
|
1297
|
-
create_plot(:hist,
|
1321
|
+
def histogram(series, kv = {})
|
1322
|
+
create_plot(:hist, series, kv) do |plt|
|
1298
1323
|
nbins = plt.kvs[:nbins] || 0
|
1299
|
-
x, y = hist(
|
1300
|
-
plt.args = [
|
1324
|
+
x, y = hist(series, nbins)
|
1325
|
+
plt.args = if kv[:horizontal]
|
1326
|
+
[[y, x, nil, nil, '']]
|
1327
|
+
else
|
1328
|
+
[[x, y, nil, nil, '']]
|
1329
|
+
end
|
1301
1330
|
end
|
1302
1331
|
end
|
1303
1332
|
|
@@ -1323,7 +1352,7 @@ module GR
|
|
1323
1352
|
end
|
1324
1353
|
|
1325
1354
|
# Set current subplot index.
|
1326
|
-
def subplot(nr, nc, p)
|
1355
|
+
def subplot(nr, nc, p, kv = {})
|
1327
1356
|
xmin = 1
|
1328
1357
|
xmax = 0
|
1329
1358
|
ymin = 1
|
@@ -1342,7 +1371,7 @@ module GR
|
|
1342
1371
|
# The policy of clearing when p[0]==1 is controversial
|
1343
1372
|
clear: p[0] == 1,
|
1344
1373
|
update: p[-1] == nr * nc
|
1345
|
-
}
|
1374
|
+
}.merge kv
|
1346
1375
|
end
|
1347
1376
|
|
1348
1377
|
# (Plot) Save the current figure to a file.
|
data/lib/gr_commons/version.rb
CHANGED
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-gr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: histogram
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
type: :
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
@@ -25,13 +25,13 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: numo-narray
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
|
-
type: :
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|