質問編集履歴
1
修正案1追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,6 +60,33 @@
|
|
60
60
|
comp = Complex()
|
61
61
|
comp.plot(lambda d:3*(1+comp.math.cos(d)+comp.math.sin(d)+comp.math.cos(2*d)+comp.math.sin(2*d)))
|
62
62
|
comp.plot(lambda d:6*(1+comp.math.cos(d)+comp.math.sin(d)+comp.math.cos(2*d)+comp.math.sin(2*d)))
|
63
|
+
|
64
|
+
# 修正案1 start ---------------------------
|
65
|
+
def plot1( self, *args):
|
66
|
+
xs, ys = [], []
|
67
|
+
for i in range( 361 ):
|
68
|
+
try:
|
69
|
+
x, y = self.comp( *args( self.math.radians(i) ), i )
|
70
|
+
xs.append( x )
|
71
|
+
ys.append( y )
|
72
|
+
except:
|
73
|
+
pass
|
74
|
+
|
75
|
+
|
76
|
+
self.plt.figure( figsize=( 5, 5 ) )
|
77
|
+
self.grid_plot( max(xs), max(ys) )
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
# 複数描写するには追加でplotをすればよい
|
82
|
+
self.plt.plot( xs, ys )
|
83
|
+
|
84
|
+
# ★確認の為追加、不要なら削除
|
85
|
+
self.plt.show()
|
86
|
+
|
87
|
+
|
88
|
+
return None
|
89
|
+
# 修正案1 end ---------------------------
|
63
90
|
```
|
64
91
|
|
65
92
|
### 試したこと
|
@@ -69,5 +96,5 @@
|
|
69
96
|
|
70
97
|
### 補足情報(FW/ツールのバージョンなど)
|
71
98
|
|
72
|
-
|
99
|
+
修正案1の追加
|
73
100
|
|