回答編集履歴
2
サンプルに余分な記述があったので修正
answer
CHANGED
@@ -18,9 +18,8 @@
|
|
18
18
|
|
19
19
|
x = np.linspace(328,330,21)
|
20
20
|
y = np.linspace(41,43,21)
|
21
|
-
F = np.random.choice([0, 0.001, 0.01, 0.1],20*20)
|
21
|
+
# F = np.random.choice([0, 0.001, 0.01, 0.1],20*20)
|
22
|
-
F[F<0] = 0
|
23
|
-
|
22
|
+
F = np.random.uniform(0,1,20*20)
|
24
23
|
|
25
24
|
X, Y = np.meshgrid(x,y)
|
26
25
|
F = np.array(F).reshape(len(x)-1,-1)
|
1
サンプルに紛らわしいところがあったので修正
answer
CHANGED
@@ -28,8 +28,8 @@
|
|
28
28
|
|
29
29
|
fig = plt.figure(figsize=(7.5, 7.5))
|
30
30
|
ax = fig.add_subplot(111)
|
31
|
-
|
31
|
+
c = ax.pcolormesh(X, Y, m, cmap='gray_r', vmin=0, vmax=20)
|
32
|
-
fig.colorbar(
|
32
|
+
fig.colorbar(c, label='A')
|
33
33
|
|
34
34
|
plt.show()
|
35
35
|
```
|