回答編集履歴
1
Update
answer
CHANGED
@@ -11,14 +11,14 @@
|
|
11
11
|
star_points = []
|
12
12
|
for i in range(10):
|
13
13
|
if i%2==0:
|
14
|
-
star_points.append([r*math.cos(math.pi/2 + i*math.pi*2/5 + x
|
14
|
+
star_points.append([r*math.cos(math.pi/2 + i*math.pi*2/5) + x, r*math.sin(math.pi/2 + i*math.pi*2/5) + y])
|
15
15
|
|
16
16
|
a = Polygon(xy=star_points, closed=True, color=c)
|
17
17
|
return a
|
18
18
|
|
19
19
|
fig = plt.figure(figsize=(4, 4))
|
20
20
|
ax = fig.add_subplot(111)
|
21
|
-
ax.set_xlim([-
|
21
|
+
ax.set_xlim([-1, 3])
|
22
22
|
ax.set_ylim([-1, 3])
|
23
23
|
|
24
24
|
xs=[0, 2]
|
@@ -33,5 +33,4 @@
|
|
33
33
|
|
34
34
|
plt.show()
|
35
35
|
```
|
36
|
-
|
37
|
-

|