質問編集履歴
1
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,65 +4,59 @@
|
|
4
4
|
|
5
5
|
```python 3.x
|
6
6
|
|
7
|
+
import matplotlib.cm as cm
|
8
|
+
|
7
9
|
import math
|
10
|
+
|
11
|
+
import matplotlib.pyplot as plt
|
8
12
|
|
9
13
|
import numpy as np
|
10
14
|
|
11
|
-
import matplotlib.pyplot as plt
|
12
15
|
|
13
|
-
|
16
|
+
|
17
|
+
|
14
18
|
|
15
19
|
|
16
20
|
|
17
21
|
# データ
|
18
22
|
|
19
|
-
p2 =np.loadtxt('
|
23
|
+
p2 =np.loadtxt('initial.csv',delimiter=',')
|
20
24
|
|
25
|
+
# 軸作成
|
21
26
|
|
27
|
+
a,b = [],[]
|
22
28
|
|
23
|
-
|
29
|
+
x = p2[0,:]
|
24
30
|
|
25
|
-
y
|
31
|
+
y = p2[:,0]
|
26
32
|
|
27
|
-
|
33
|
+
x = y[1:]
|
28
34
|
|
29
|
-
|
35
|
+
y = x[1:]
|
30
36
|
|
31
|
-
|
37
|
+
for num in range(len(x)):
|
32
38
|
|
33
|
-
|
39
|
+
a.append(y)
|
34
|
-
|
35
|
-
|
36
40
|
|
37
41
|
for num in range(len(y)):
|
38
42
|
|
39
|
-
|
43
|
+
b.append(z)
|
40
44
|
|
41
|
-
|
45
|
+
c = np.array(a)
|
42
46
|
|
43
|
-
zz.append(z)
|
44
|
-
|
45
|
-
Y = np.array(yy)
|
46
|
-
|
47
|
-
|
47
|
+
d = np.array(b).T
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
#データ2次元配列作成
|
52
48
|
|
53
49
|
p2 = np.delete(p2,0,1)
|
54
50
|
|
55
51
|
p2 = np.delete(p2,0,0)
|
56
52
|
|
57
|
-
|
58
|
-
|
59
53
|
#グラフ
|
60
54
|
|
61
|
-
plt.contourf(
|
55
|
+
plt.contourf(c,d,p2,1000)
|
62
56
|
|
63
|
-
plt.xlabel('
|
57
|
+
plt.xlabel('takasa')
|
64
58
|
|
65
|
-
plt.ylabel('
|
59
|
+
plt.ylabel('haba')
|
66
60
|
|
67
61
|
plt.imshow(p2,cmap=cm.bwr)
|
68
62
|
|