ruby-gr 0.0.6 → 0.0.7

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: f31069eac6089014b6cbea3453d5c7e42996e02b1b243e0b8d3aa116fb1b3c3f
4
- data.tar.gz: 697465b25729e4f7a8b9b8c6252b3ceec4e6614f5760994cb91a2a8ad31d34df
3
+ metadata.gz: 55e5471b8532f7e180f80572158336cecc130575626a2b3361bd7ce6b0454bef
4
+ data.tar.gz: d7387d744d28cb389a44769df8b9d477adc2a1320f73f8d02c55ffc17d1b1a02
5
5
  SHA512:
6
- metadata.gz: 74496ad16167dfba8725c67f65b20125f00d1969a0c311e1e9312be465e740c303df9482671c61d04c2de77773208ac8cfb6e33c301f33173ce27fe21540d9f0
7
- data.tar.gz: 0c5ee85a6944438ea3f0b0ecfc61ef1f188a4c779205d84eb2bce63b83746fe36ee57c94d402235bb020189d526f03e6d9f1828253da181bd95307fcaf8e0b5e
6
+ metadata.gz: 1d13f13cb5e85843ab006b0ea1ce8a6d400edceb0b5f69ac8bf86eb5a756ce8c2dfed5ebbf7c0ecddc07ef48fba948528c53df77bf6899664098f76c8fbdb282
7
+ data.tar.gz: 7f1d0091163902cb52acd7f3e0fab91cc15e178a0c39be8476e05397a8f9b6de9aad25211f4e9cb2e04ee199ebf51a6a78d8d3afbc89781743c616c74fa6a8fb
data/README.md CHANGED
@@ -36,7 +36,7 @@ require 'gr/plot'
36
36
  x = [0, 0.2, 0.4, 0.6, 0.8, 1.0]
37
37
  y = [0.3, 0.5, 0.4, 0.2, 0.6, 0.7]
38
38
 
39
- GR.lineplot(x, y)
39
+ GR.plot(x, y)
40
40
  ```
41
41
 
42
42
  ## Examples
@@ -20,7 +20,7 @@ module GR
20
20
  # So, you will see many if branches here.
21
21
  # This is not the Ruby code style. But it WORKS.
22
22
  #
23
- # I want to thank the Josef Heinen(@jheinen), the creator of GR.jl
23
+ # I want to thank Josef Heinen(@jheinen), the creator of GR.jl
24
24
  # and Florian Rhiem(@FlorianRhiem), the creator of python-gr.
25
25
  #
26
26
  # If you are interested in an object-oriented implementation,
@@ -190,7 +190,7 @@ module GR
190
190
  kvs[:xaxis] = xtick, xorg, majorx
191
191
 
192
192
  ymin, ymax = kvs[:yrange]
193
- if kind == :hist && kvs.key?(:ylim)
193
+ if kind == :hist && !kvs.key?(:ylim)
194
194
  ymin = (scale & GR::OPTION_Y_LOG) == 0 ? 0 : 1
195
195
  end
196
196
  if (scale & GR::OPTION_Y_LOG) == 0
@@ -669,9 +669,14 @@ module GR
669
669
  draw_polar_axes
670
670
  kvs[:zrange] = [cmin, cmax]
671
671
  colorbar
672
- when :contour
672
+ when :contour, :contourf
673
673
  zmin, zmax = kvs[:zrange]
674
- if x.length == y.length && y.length == z.length
674
+ if narray?(z) && z.ndim == 2
675
+ a, b = z.shape
676
+ x = (1..b).to_a
677
+ y = (1..a).to_a
678
+ zmin, zmax = kvs[:zlim] || z.minmax
679
+ elsif equal_length(x, y, z)
675
680
  x, y, z = GR.gridit(x, y, z, 200, 200)
676
681
  zmin, zmax = kvs[:zlim] || z.compact.minmax # compact : removed nil
677
682
  end
@@ -684,28 +689,15 @@ module GR
684
689
  else
685
690
  h = levels
686
691
  end
687
- GR.contour(x, y, h, z, clabels ? 1 : 1000)
688
- colorbar(0, h.length)
689
- when :contourf
690
- zmin, zmax = kvs[:zrange]
691
- if x.length == y.length && y.length == z.length
692
- x, y, z = GR.gridit(x, y, z, 200, 200)
693
- zmin, zmax = kvs[:zlim] || z.compact.minmax # compact : removed nil
694
- end
695
- GR.setspace(zmin, zmax, 0, 90)
696
- levels = kvs[:levels] || 0
697
- clabels = kvs[:clabels] || false
698
- if levels.is_a? Integer
699
- hmin, hmax = GR.adjustrange(zmin, zmax)
700
- h = linspace(hmin, hmax, levels == 0 ? 21 : levels + 1)
701
- else
702
- h = levels
692
+ if kind == :contour
693
+ GR._contour_(x, y, h, z, clabels ? 1 : 1000)
694
+ elsif kind == :contourf
695
+ GR._contourf_(x, y, h, z, clabels ? 1 : 0)
703
696
  end
704
- GR.contourf(x, y, h, z, clabels ? 1 : 0)
705
697
  colorbar(0, h.length)
706
698
  when :hexbin
707
699
  nbins = kvs[:nbins] || 40
708
- cntmax = GR.hexbin(x, y, nbins)
700
+ cntmax = GR._hexbin_(x, y, nbins)
709
701
  if cntmax > 0
710
702
  kvs[:zrange] = [0, cntmax]
711
703
  colorbar
@@ -737,14 +729,26 @@ module GR
737
729
  end
738
730
  colorbar(0, levels)
739
731
  when :wireframe
740
- x, y, z = GR.gridit(x, y, z, 50, 50) if equal_length(x, y, z)
732
+ if narray?(z) && z.ndim == 2
733
+ a, b = z.shape
734
+ x = (1..b).to_a
735
+ y = (1..a).to_a
736
+ elsif equal_length(x, y, z)
737
+ x, y, z = GR.gridit(x, y, z, 50, 50)
738
+ end
741
739
  GR.setfillcolorind(0)
742
- GR.surface(x, y, z, GR::OPTION_FILLED_MESH)
740
+ GR._surface_(x, y, z, GR::OPTION_FILLED_MESH)
743
741
  draw_axes(kind, 2)
744
742
  when :surface
745
- x, y, z = GR.gridit(x, y, z, 200, 200) if equal_length(x, y, z)
743
+ if narray?(z) && z.ndim == 2
744
+ a, b = z.shape
745
+ x = (1..b).to_a
746
+ y = (1..a).to_a
747
+ elsif equal_length(x, y, z)
748
+ x, y, z = GR.gridit(x, y, z, 200, 200)
749
+ end
746
750
  if kvs[:accelerate] == false
747
- GR.surface(x, y, z, GR::OPTION_COLORED_MESH)
751
+ GR._surface_(x, y, z, GR::OPTION_COLORED_MESH)
748
752
  else
749
753
  require 'gr3'
750
754
  GR3.clear
@@ -785,13 +789,13 @@ module GR
785
789
  GR.uselinespec(spec)
786
790
  plot_polar(x, y)
787
791
  when :trisurf
788
- GR.trisurface(x, y, z)
792
+ GR._trisurface_(x, y, z)
789
793
  draw_axes(kind, 2)
790
794
  colorbar(0.05)
791
795
  when :tricont
792
796
  zmin, zmax = kvs[:zrange]
793
797
  levels = linspace(zmin, zmax, 20)
794
- GR.tricontour(x, y, z, levels)
798
+ GR._tricontour_(x, y, z, levels)
795
799
  when :shade
796
800
  xform = kvs[:xform] || 5
797
801
  if x.to_a.include? Float::NAN # FIXME: Ruby is different from Julia?
@@ -1078,42 +1082,33 @@ module GR
1078
1082
  end
1079
1083
 
1080
1084
  class << self
1081
- def lineplot(*args)
1082
- plt = GR::Plot.new(*args)
1083
- plt.plot_data
1085
+ # line plot
1086
+ def plot(*args)
1087
+ create_plot(:line, *args)
1084
1088
  end
1085
1089
 
1086
- def stepplot(*args)
1087
- plt = GR::Plot.new(*args)
1088
- plt.kvs[:kind] = :step
1089
- plt.plot_data
1090
+ def step(*args)
1091
+ create_plot(:step, *args)
1090
1092
  end
1091
1093
 
1092
- def scatterplot(*args)
1093
- plt = GR::Plot.new(*args)
1094
- plt.kvs[:kind] = :scatter
1095
- plt.plot_data
1094
+ def scatter(*args)
1095
+ create_plot(:scatter, *args)
1096
1096
  end
1097
1097
 
1098
- def scatterplot3(*args)
1099
- plt = GR::Plot.new(*args)
1100
- plt.kvs[:kind] = :scatter3
1101
- plt.plot_data
1098
+ def scatter3(*args)
1099
+ create_plot(:scatter3, *args)
1102
1100
  end
1103
1101
 
1104
- def stemplot(*args)
1105
- plt = GR::Plot.new(*args)
1106
- plt.kvs[:kind] = :stem
1107
- plt.plot_data
1102
+ def stem(*args)
1103
+ create_plot(:stem, *args)
1108
1104
  end
1109
1105
 
1110
1106
  def histogram(x, kv = {})
1111
- plt = GR::Plot.new(x, kv)
1112
- plt.kvs[:kind] = :hist
1113
- nbins = plt.kvs[:nbins] || 0
1114
- x, y = hist(x, nbins)
1115
- plt.args = [[x, y, nil, nil, '']]
1116
- plt.plot_data
1107
+ create_plot(:hist, x, kv) do |plt|
1108
+ nbins = plt.kvs[:nbins] || 0
1109
+ x, y = hist(x, nbins)
1110
+ plt.args = [[x, y, nil, nil, '']]
1111
+ end
1117
1112
  end
1118
1113
 
1119
1114
  # def polarhistogram(x, kv = {})
@@ -1126,19 +1121,15 @@ module GR
1126
1121
  # end
1127
1122
 
1128
1123
  def heatmap(*args)
1129
- plt = GR::Plot.new(*args)
1130
- plt.kvs[:kind] = :heatmap
1131
1124
  # FIXME
1132
- if narray?(args.first)
1133
- z = args.first
1134
- width, height = z.shape
1135
- plt.kvs[:xlim] ||= [0.5, width + 0.5]
1136
- plt.kvs[:ylim] ||= [0.5, height + 0.5]
1137
- plt.args = [[[*1..width], [*1..height], z, nil, '']]
1138
- else
1139
- raise 'not implemented'
1125
+ _x, _y, z, kv = parse_args(*args)
1126
+ ysize, xsize = z.shape
1127
+ z = z.reshape(xsize, ysize)
1128
+ create_plot(:heatmap, kv) do |plt|
1129
+ plt.kvs[:xlim] ||= [0.5, xsize + 0.5]
1130
+ plt.kvs[:ylim] ||= [0.5, ysize + 0.5]
1131
+ plt.args = [[(1..xsize).to_a, (1..ysize).to_a, z, nil, '']]
1140
1132
  end
1141
- plt.plot_data
1142
1133
  end
1143
1134
 
1144
1135
  def polarheatmap(*args)
@@ -1147,184 +1138,144 @@ module GR
1147
1138
  z = Numo::DFloat.cast(d)
1148
1139
  raise 'expected 2-D array' unless z.ndim == 2
1149
1140
 
1150
- plt = GR::Plot.new(*args)
1151
- plt.kvs[:kind] = :polarheatmap
1152
- width, height = z.shape
1153
- plt.kvs[:xlim] ||= [0.5, width + 0.5]
1154
- plt.kvs[:ylim] ||= [0.5, height + 0.5]
1155
- plt.args = [[(1..width).to_a, (1..height).to_a, z, nil, '']]
1156
- plt.plot_data
1141
+ create_plot(:polarheatmap, z, *args) do |plt|
1142
+ width, height = z.shape
1143
+ plt.kvs[:xlim] ||= [0.5, width + 0.5]
1144
+ plt.kvs[:ylim] ||= [0.5, height + 0.5]
1145
+ plt.args = [[(1..width).to_a, (1..height).to_a, z, nil, '']]
1146
+ end
1157
1147
  end
1158
1148
 
1159
- def contourplot(*args)
1160
- kv = if args[-1].is_a? Hash
1161
- args.pop
1162
- else
1163
- {}
1164
- end
1165
- if args.size == 1
1166
- if args[0].is_a? Array
1167
- z = Numo::DFloat.cast(args[0])
1168
- xsize, ysize = z.shape
1169
- elsif narray?(args[0])
1170
- z = args[0]
1171
- xsize, ysize = z.shape
1172
- end
1173
- x = (1..xsize).to_a
1174
- y = (1..ysize).to_a
1175
- elsif args.size == 3
1176
- x, y, z = args
1177
- else
1178
- raise
1179
- end
1180
- plt = GR::Plot.new(x, y, z, kv)
1181
- plt.kvs[:kind] = :contour
1182
- plt.plot_data
1149
+ alias _contour_ contour
1150
+ def contour(*args)
1151
+ x, y, z, kv = parse_args(*args)
1152
+ create_plot(:contour, x, y, z, kv)
1183
1153
  end
1184
1154
 
1185
- def contourfplot(*args)
1186
- kv = if args[-1].is_a? Hash
1187
- args.pop
1188
- else
1189
- {}
1190
- end
1191
- if args.size == 1
1192
- if args[0].is_a? Array
1193
- z = Numo::DFloat.cast(args[0])
1194
- xsize, ysize = z.shape
1195
- elsif narray?(args[0])
1196
- z = args[0]
1197
- xsize, ysize = z.shape
1198
- end
1199
- x = (1..xsize).to_a
1200
- y = (1..ysize).to_a
1201
- elsif args.size == 3
1202
- x, y, z = args
1203
- else
1204
- raise
1205
- end
1206
- plt = GR::Plot.new(x, y, z, kv)
1207
- plt.kvs[:kind] = :contourf
1208
- plt.plot_data
1155
+ alias _contourf_ contourf
1156
+ def contourf(*args)
1157
+ x, y, z, kv = parse_args(*args)
1158
+ create_plot(:contourf, x, y, z, kv)
1209
1159
  end
1210
1160
 
1211
- def hexbinplot(*args)
1212
- plt = GR::Plot.new(*args)
1213
- plt.kvs[:kind] = :hexbin
1214
- plt.plot_data
1161
+ alias _hexbin_ hexbin
1162
+ def hexbin(*args)
1163
+ create_plot(:hexbin, *args)
1215
1164
  end
1216
1165
 
1217
- def tricontourplot(*args)
1218
- plt = GR::Plot.new(*args)
1219
- plt.kvs[:kind] = :tricont
1220
- plt.plot_data
1166
+ alias _tricontour_ tricontour
1167
+ def tricontour(*args)
1168
+ create_plot(:tricont, *args)
1221
1169
  end
1222
1170
 
1223
- def surfaceplot(*args)
1224
- kv = if args[-1].is_a? Hash
1225
- args.pop
1226
- else
1227
- {}
1228
- end
1229
- if args.size == 1
1230
- if args[0].is_a? Array
1231
- z = Numo::DFloat.cast(args[0])
1232
- xsize, ysize = z.shape
1233
- elsif narray?(args[0])
1234
- z = args[0]
1235
- xsize, ysize = z.shape
1236
- end
1237
- x = ([(1..xsize).to_a] * ysize).flatten
1238
- y = ((1..ysize).to_a.map { |i| [i] * xsize }).flatten
1239
- elsif args.size == 3
1240
- x, y, z = args
1241
- else
1242
- raise
1243
- end
1244
- plt = GR::Plot.new(x, y, z, kv)
1245
- plt.kvs[:kind] = :surface
1246
- plt.plot_data
1171
+ alias _surface_ surface
1172
+ def surface(*args)
1173
+ x, y, z, kv = parse_args(*args)
1174
+ create_plot(:surface, x, y, z, kv)
1247
1175
  end
1248
1176
 
1249
- def polarplot(*args)
1250
- plt = GR::Plot.new(*args)
1251
- plt.kvs[:kind] = :polar
1252
- plt.plot_data
1177
+ def polar(*args)
1178
+ create_plot(:polar, *args)
1253
1179
  end
1254
1180
 
1255
- def trisurfaceplot(*args)
1256
- plt = GR::Plot.new(*args)
1257
- plt.kvs[:kind] = :trisurf
1258
- plt.plot_data
1181
+ alias _trisurface_ trisurface
1182
+ def trisurface(*args)
1183
+ create_plot(:trisurf, *args)
1259
1184
  end
1260
1185
 
1261
1186
  def wireframe(*args)
1262
- plt = GR::Plot.new(*args)
1263
- plt.kvs[:kind] = :wireframe
1264
- plt.plot_data
1187
+ create_plot(:wireframe, *args)
1265
1188
  end
1266
1189
 
1267
- def lineplot3(*args)
1268
- plt = GR::Plot.new(*args)
1269
- plt.kvs[:kind] = :plot3
1270
- plt.plot_data
1190
+ def plot3(*args)
1191
+ create_plot(:plot3, *args)
1271
1192
  end
1272
1193
 
1273
- # Note: GR.shade exists
1194
+ alias _shade_ shade
1274
1195
  def shade(*args)
1275
- plt = GR::Plot.new(*args)
1276
- plt.kvs[:kind] = :shade
1277
- plt.plot_data
1196
+ create_plot(:shade, *args)
1278
1197
  end
1279
1198
 
1280
- def volumeplot(v, kv = {})
1281
- plt = GR::Plot.new(v, kv)
1282
- plt.kvs[:kind] = :volume
1283
- plt.args = [[nil, nil, v, nil, '']]
1284
- plt.plot_data
1199
+ def volume(v, kv = {})
1200
+ create_plot(:volume, v, kv) do |plt|
1201
+ plt.args = [[nil, nil, v, nil, '']]
1202
+ end
1285
1203
  end
1286
1204
 
1287
1205
  def barplot(labels, heights, kv = {})
1206
+ labels = labels.map(&:to_s)
1288
1207
  wc, hc = barcoordinates(heights)
1289
1208
  horizontal = kv[:horizontal] || false
1290
- plt = GR::Plot.new(labels, heights, kv)
1291
- plt.kvs[:kind] = :bar
1292
- if horizontal
1293
- plt.args = [[hc, wc, nil, nil, '']]
1294
- plt.kvs[:yticks] = [1, 1]
1295
- plt.kvs[:yticklabels] = labels
1296
- else
1297
- plt.args = [[wc, hc, nil, nil, '']]
1298
- plt.kvs[:xticks] = [1, 1]
1299
- plt.kvs[:xticklabels] = labels
1209
+ create_plot(:bar, labels, heights, kv) do |plt|
1210
+ if horizontal
1211
+ plt.args = [[hc, wc, nil, nil, '']]
1212
+ plt.kvs[:yticks] = [1, 1]
1213
+ plt.kvs[:yticklabels] = labels
1214
+ else
1215
+ plt.args = [[wc, hc, nil, nil, '']]
1216
+ plt.kvs[:xticks] = [1, 1]
1217
+ plt.kvs[:xticklabels] = labels
1218
+ end
1300
1219
  end
1301
- plt.plot_data
1302
1220
  end
1303
1221
 
1304
1222
  def imshow(img, kv = {})
1305
1223
  img = Numo::DFloat.cast(img) # Umm...
1306
- plt = GR::Plot.new(kv)
1307
- plt.kvs[:kind] = :imshow
1308
- plt.args = [[nil, nil, img, nil, '']]
1309
- plt.plot_data
1224
+ create_plot(:imshow, img, kv) do |plt|
1225
+ plt.args = [[nil, nil, img, nil, '']]
1226
+ end
1310
1227
  end
1311
1228
 
1312
1229
  def isosurface(v, kv = {})
1313
1230
  v = Numo::DFloat.cast(v) # Umm...
1314
- plt = GR::Plot.new(kv)
1315
- plt.kvs[:kind] = :isosurface
1316
- plt.args = [[nil, nil, v, nil, '']]
1317
- plt.plot_data
1231
+ create_plot(:isosurface, v, kv) do |plt|
1232
+ plt.args = [[nil, nil, v, nil, '']]
1233
+ end
1318
1234
  end
1319
1235
 
1320
1236
  private
1321
1237
 
1238
+ def create_plot(type, *args, &block)
1239
+ plt = GR::Plot.new(*args)
1240
+ plt.kvs[:kind] = type
1241
+ block.call(plt) if block_given?
1242
+ plt.plot_data
1243
+ end
1244
+
1245
+ def parse_args(*args)
1246
+ kv = if args[-1].is_a? Hash
1247
+ args.pop
1248
+ else
1249
+ {}
1250
+ end
1251
+ if args.size == 1
1252
+ if args[0].is_a? Array
1253
+ z = Numo::DFloat.cast(args[0])
1254
+ elsif narray?(args[0])
1255
+ z = args[0]
1256
+ end
1257
+ xsize, ysize = z.shape
1258
+ # NOTE:
1259
+ # See
1260
+ # https://github.com/jheinen/GR.jl/pull/246
1261
+ # https://github.com/jheinen/GR.jl/issues/241
1262
+ x = (1..ysize).to_a * xsize
1263
+ y = (1..xsize).map { |i| Array.new(ysize, i) }.flatten
1264
+
1265
+ elsif args.size == 3
1266
+ x, y, z = args
1267
+ else
1268
+ raise
1269
+ end
1270
+ [x, y, z, kv]
1271
+ end
1272
+
1322
1273
  def hist(x, nbins = 0)
1323
1274
  nbins = (3.3 * Math.log10(x.length)).round + 1 if nbins <= 1
1324
1275
  require 'histogram/array' # dependency
1325
1276
  x = x.to_a if narray?(x)
1326
1277
  x, y = x.histogram(nbins, bin_boundary: :min)
1327
- x.unshift(x.min)
1278
+ x.push(x[-1] + x[1] - x[0])
1328
1279
  [x, y]
1329
1280
  end
1330
1281
 
@@ -72,82 +72,60 @@ module GR
72
72
  def plot_args; end # should be private?
73
73
 
74
74
  # Draw one or more line plots.
75
- def plot_line; end
76
- alias lineplot plot_line
75
+ def plot; end
77
76
 
78
77
  # def plot_line_over oplot_line ?
79
78
 
80
79
  # Draw one or more step or staircase plots.
81
- def plot_step; end
82
- alias stepplot plot_step
83
- alias step plot_step
80
+ def step; end
84
81
 
85
82
  # Draw one or more scatter plots.
86
- def plot_scatter; end
87
- alias scatterplot plot_scatter
88
- alias scatter plot_scatter
83
+ def scatter; end
89
84
 
90
85
  # Draw a stem plot.
91
- def plot_stem; end
92
- alias stemplot plot_stem
93
- alias stem plot_stem
86
+ def stem; end
94
87
 
95
88
  # Draw a bar plot.
96
- def plot_bar; end
97
- alias barplot plot_bar
98
- alias bar plot_bar
89
+ def barplot; end
99
90
 
100
91
  def hist; end # should be private?
101
92
 
102
93
  # Draw a histogram.
103
- def plot_histgram; end
104
- alias histogram plot_histgram
94
+ def histgram; end
105
95
 
106
96
  # Draw a polar histogram.
107
- def plot_polarhistogram; end
108
- alias polarhistogram plot_polarhistogram
97
+ def polarhistogram; end
109
98
 
110
99
  # Draw a contour plot.
111
- def plot_contour; end
112
- alias contourplot plot_contour
100
+ def contour; end
113
101
  # GR.contour is already defined in GR::FFI class.
114
102
 
115
103
  # Draw a filled contour plot.
116
- def plot_contourf; end
117
- alias contourfplot plot_contour # change name?
104
+ def contourf; end
118
105
  # GR.contourf is already defined in GR::FFI class.
119
106
 
120
107
  # Draw a hexagon binning plot.
121
- def plot_hexbin; end
122
- alias hexbinplot plot_hexbin
108
+ def hexbin; end
123
109
  # GR.hexbin is already defined in GR::FFI class.
124
- alias jointplot plot_hexbin
125
110
 
126
111
  # Draw a heatmap.
127
- def plot_heatmap; end
128
- alias heatmap plot_heatmap
112
+ def heatmap; end
129
113
 
130
- def plot_polarheatmap; end
131
- alias polarheatmap plot_polarheatmap
114
+ def polarheatmap; end
132
115
 
133
116
  # Draw a three-dimensional wireframe plot.
134
- def plot_wireframe; end
135
- alias wireframe plot_wireframe
117
+ def wireframe; end
136
118
 
137
119
  # Draw a three-dimensional surface plot.
138
- def plot_surface; end
139
- alias surfaceplot plot_surface
120
+ def surface; end
140
121
 
141
- def plot_volume; end
142
- alias volumeplot plot_volume
122
+ def volume; end
143
123
 
144
124
  # Draw one or more three-dimensional line plots.
145
- def plot_line3; end
146
- alias lineplot3 plot_line3
125
+ def plot3; end
147
126
 
148
127
  # Draw one or more three-dimensional scatter plots.
149
- def plot_scatter3; end
150
- alias scatterplot3 plot_scatter3
128
+ def scatter3; end
151
129
 
152
130
  def redraw; end
153
131
 
@@ -172,35 +150,22 @@ module GR
172
150
  def imshow; end
173
151
 
174
152
  # Draw an isosurface.
175
- def plot_isosurface; end
153
+ def isosurface; end
176
154
 
177
155
  # Draw one or more polar plots.
178
- def plot_polar; end
156
+ def polar; end
179
157
 
180
158
  # Draw a triangular surface plot.
181
- def plot_trisurf; end
159
+ def trisurf; end
182
160
 
183
161
  # Draw a triangular contour plot.
184
- def plot_tricont; end
162
+ def tricont; end
185
163
 
186
- def plot_shade; end
164
+ def shade; end
187
165
 
188
166
  # def set_panzoom ?
189
167
 
190
168
  # mainloop
191
-
192
- # GR.plot do
193
- #
194
- # end
195
- #
196
- # GR.plot(:scatter, * * *)
197
- def plot; end
198
-
199
- # Object ?
200
-
201
- # a = GR::Bar.new()
202
- # a.draw ?
203
- # a = GR::Bar.plot() ?
204
169
  end
205
170
  end
206
171
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GRCommons
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-gr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - kojix2
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-01 00:00:00.000000000 Z
11
+ date: 2019-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler