質問編集履歴
1
見やすくした
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,43 +28,35 @@
|
|
28
28
|
|
29
29
|
import math
|
30
30
|
|
31
|
-
|
31
|
+
from matplotlib.font_manager import FontProperties
|
32
32
|
|
33
|
-
plt.plot(x,y)
|
34
|
-
|
35
|
-
|
33
|
+
fp = FontProperties(fname = 'C:\windows\Fonts\msgothic.ttc',size = 14)
|
36
|
-
|
37
|
-
plt.ylabel('シータ θ')
|
38
|
-
|
39
|
-
plt.title('斜張力場')
|
40
|
-
|
41
|
-
plt.show()
|
42
34
|
|
43
35
|
|
44
36
|
|
45
|
-
def
|
37
|
+
def susumu(s, f, in):
|
46
38
|
|
47
|
-
|
39
|
+
b = []
|
48
40
|
|
49
|
-
while s
|
41
|
+
while s < f:
|
50
42
|
|
51
|
-
|
43
|
+
b.append(s)
|
52
44
|
|
53
|
-
s
|
45
|
+
s = s + in
|
54
46
|
|
55
|
-
return
|
47
|
+
return b
|
56
48
|
|
57
49
|
|
58
50
|
|
59
51
|
def keisan():
|
60
52
|
|
61
|
-
in
|
53
|
+
in = susumu(0.5,a,0.1)
|
62
54
|
|
63
55
|
x = []
|
64
56
|
|
65
57
|
y = []
|
66
58
|
|
67
|
-
for t in in
|
59
|
+
for t in in:
|
68
60
|
|
69
61
|
x.append(t)
|
70
62
|
|
@@ -74,9 +66,23 @@
|
|
74
66
|
|
75
67
|
|
76
68
|
|
69
|
+
def graph(x,y):
|
70
|
+
|
71
|
+
plt.plot(x,y)
|
72
|
+
|
73
|
+
plt.xlabel('アスペクト比 α',fontproperties = fp)
|
74
|
+
|
75
|
+
plt.ylabel('シータ θ',fontproperties = fp)
|
76
|
+
|
77
|
+
plt.title('斜張力場')
|
78
|
+
|
79
|
+
plt.show()
|
80
|
+
|
81
|
+
|
82
|
+
|
77
83
|
if __name__ == '__main__':
|
78
84
|
|
79
|
-
a = float(input('
|
85
|
+
a = float(input('b: ')
|
80
86
|
|
81
87
|
keisan()
|
82
88
|
|