質問するログイン新規登録

回答編集履歴

1

d

2018/12/20 08:21

投稿

tiitoi
tiitoi

スコア21962

answer CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  ```pythonimport numpy as np
5
5
  import matplotlib.pyplot as plt
6
+ import numpy as np
6
7
 
7
8
  x = np.arange(30)
8
9
  y1 = 1**x
@@ -10,8 +11,8 @@
10
11
  s1 = np.cumsum(y1)
11
12
  s2 = np.cumsum(y2)
12
13
 
13
- plt.plot(x, s1, 'bo-', label='$1^x$', ms=3, mfc='black', drawstyle='steps-post')
14
+ plt.plot(x, s1, 'bo', label='$1^x$', ms=3)
14
- plt.plot(x, s2, 'go-', label='$(-1)^x$', ms=3, mfc='black', drawstyle='steps-post')
15
+ plt.plot(x, s2, 'go', label='$(-1)^x$', ms=3)
15
16
  plt.xlabel('x')
16
17
  plt.ylabel('y')
17
18
  plt.title('series')