回答編集履歴
1
追記
answer
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
【追記】
|
2
|
+
xの間隔(座標)を考慮すると質問者さんと同じようなグラフになりました。
|
3
|
+
|
4
|
+
```Python
|
5
|
+
dy = np.gradient(y, x)
|
6
|
+
plt.plot(x, dy)
|
7
|
+
plt.show()
|
8
|
+
```
|
9
|
+

|
10
|
+
|
11
|
+
---
|
12
|
+
【xの間隔が1の場合】
|
1
13
|
```python
|
2
14
|
dy = np.gradient(y)
|
3
15
|
plt.plot(x, dy)
|