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 +4 -4
- data/README.md +1 -1
- data/lib/gr/plot.rb +146 -195
- data/lib/gr/plot.rb.md +22 -57
- data/lib/gr_commons/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55e5471b8532f7e180f80572158336cecc130575626a2b3361bd7ce6b0454bef
|
4
|
+
data.tar.gz: d7387d744d28cb389a44769df8b9d477adc2a1320f73f8d02c55ffc17d1b1a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d13f13cb5e85843ab006b0ea1ce8a6d400edceb0b5f69ac8bf86eb5a756ce8c2dfed5ebbf7c0ecddc07ef48fba948528c53df77bf6899664098f76c8fbdb282
|
7
|
+
data.tar.gz: 7f1d0091163902cb52acd7f3e0fab91cc15e178a0c39be8476e05397a8f9b6de9aad25211f4e9cb2e04ee199ebf51a6a78d8d3afbc89781743c616c74fa6a8fb
|
data/README.md
CHANGED
data/lib/gr/plot.rb
CHANGED
@@ -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
|
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
|
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
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
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.
|
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
|
-
|
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.
|
740
|
+
GR._surface_(x, y, z, GR::OPTION_FILLED_MESH)
|
743
741
|
draw_axes(kind, 2)
|
744
742
|
when :surface
|
745
|
-
|
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.
|
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.
|
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.
|
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
|
-
|
1082
|
-
|
1083
|
-
|
1085
|
+
# line plot
|
1086
|
+
def plot(*args)
|
1087
|
+
create_plot(:line, *args)
|
1084
1088
|
end
|
1085
1089
|
|
1086
|
-
def
|
1087
|
-
|
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
|
1093
|
-
|
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
|
1099
|
-
|
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
|
1105
|
-
|
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
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
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
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
plt.kvs[:
|
1137
|
-
plt.
|
1138
|
-
|
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
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
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
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
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
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
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
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
plt.plot_data
|
1161
|
+
alias _hexbin_ hexbin
|
1162
|
+
def hexbin(*args)
|
1163
|
+
create_plot(:hexbin, *args)
|
1215
1164
|
end
|
1216
1165
|
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
plt.plot_data
|
1166
|
+
alias _tricontour_ tricontour
|
1167
|
+
def tricontour(*args)
|
1168
|
+
create_plot(:tricont, *args)
|
1221
1169
|
end
|
1222
1170
|
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
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
|
1250
|
-
|
1251
|
-
plt.kvs[:kind] = :polar
|
1252
|
-
plt.plot_data
|
1177
|
+
def polar(*args)
|
1178
|
+
create_plot(:polar, *args)
|
1253
1179
|
end
|
1254
1180
|
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
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
|
-
|
1263
|
-
plt.kvs[:kind] = :wireframe
|
1264
|
-
plt.plot_data
|
1187
|
+
create_plot(:wireframe, *args)
|
1265
1188
|
end
|
1266
1189
|
|
1267
|
-
def
|
1268
|
-
|
1269
|
-
plt.kvs[:kind] = :plot3
|
1270
|
-
plt.plot_data
|
1190
|
+
def plot3(*args)
|
1191
|
+
create_plot(:plot3, *args)
|
1271
1192
|
end
|
1272
1193
|
|
1273
|
-
|
1194
|
+
alias _shade_ shade
|
1274
1195
|
def shade(*args)
|
1275
|
-
|
1276
|
-
plt.kvs[:kind] = :shade
|
1277
|
-
plt.plot_data
|
1196
|
+
create_plot(:shade, *args)
|
1278
1197
|
end
|
1279
1198
|
|
1280
|
-
def
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
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
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
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
|
-
|
1307
|
-
|
1308
|
-
|
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
|
-
|
1315
|
-
|
1316
|
-
|
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.
|
1278
|
+
x.push(x[-1] + x[1] - x[0])
|
1328
1279
|
[x, y]
|
1329
1280
|
end
|
1330
1281
|
|
data/lib/gr/plot.rb.md
CHANGED
@@ -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
|
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
|
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
|
87
|
-
alias scatterplot plot_scatter
|
88
|
-
alias scatter plot_scatter
|
83
|
+
def scatter; end
|
89
84
|
|
90
85
|
# Draw a stem plot.
|
91
|
-
def
|
92
|
-
alias stemplot plot_stem
|
93
|
-
alias stem plot_stem
|
86
|
+
def stem; end
|
94
87
|
|
95
88
|
# Draw a bar plot.
|
96
|
-
def
|
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
|
104
|
-
alias histogram plot_histgram
|
94
|
+
def histgram; end
|
105
95
|
|
106
96
|
# Draw a polar histogram.
|
107
|
-
def
|
108
|
-
alias polarhistogram plot_polarhistogram
|
97
|
+
def polarhistogram; end
|
109
98
|
|
110
99
|
# Draw a contour plot.
|
111
|
-
def
|
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
|
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
|
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
|
128
|
-
alias heatmap plot_heatmap
|
112
|
+
def heatmap; end
|
129
113
|
|
130
|
-
def
|
131
|
-
alias polarheatmap plot_polarheatmap
|
114
|
+
def polarheatmap; end
|
132
115
|
|
133
116
|
# Draw a three-dimensional wireframe plot.
|
134
|
-
def
|
135
|
-
alias wireframe plot_wireframe
|
117
|
+
def wireframe; end
|
136
118
|
|
137
119
|
# Draw a three-dimensional surface plot.
|
138
|
-
def
|
139
|
-
alias surfaceplot plot_surface
|
120
|
+
def surface; end
|
140
121
|
|
141
|
-
def
|
142
|
-
alias volumeplot plot_volume
|
122
|
+
def volume; end
|
143
123
|
|
144
124
|
# Draw one or more three-dimensional line plots.
|
145
|
-
def
|
146
|
-
alias lineplot3 plot_line3
|
125
|
+
def plot3; end
|
147
126
|
|
148
127
|
# Draw one or more three-dimensional scatter plots.
|
149
|
-
def
|
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
|
153
|
+
def isosurface; end
|
176
154
|
|
177
155
|
# Draw one or more polar plots.
|
178
|
-
def
|
156
|
+
def polar; end
|
179
157
|
|
180
158
|
# Draw a triangular surface plot.
|
181
|
-
def
|
159
|
+
def trisurf; end
|
182
160
|
|
183
161
|
# Draw a triangular contour plot.
|
184
|
-
def
|
162
|
+
def tricont; end
|
185
163
|
|
186
|
-
def
|
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
|
|
data/lib/gr_commons/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|