import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-50, 50, 8000)
y = 0
for n in range(1,401):
y += (np.sin(2*n*x)/(2*n))
plt.plot(x, y)
plt.grid(True)
plt.axhline(0, color="black") # x軸
plt.axvline(0, color="black") # y軸
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: