Plotfunc

A square wave and sawtooth wave constructed by additive synthesis
import matplotlib.pyplot as plt import numpy as np x=np.arange(0,2*(np.pi),.01) y=np.sin(x)+np.sin(3*x)/3+np.sin(5*x)/5+np.sin(7*x)/7+np.sin(9*x)/9+np.sin(11*x)/11+np.sin(13*x)/13+np.sin(15*x)/15 z=np.sin(x)+np.sin(2*x)/2+np.sin(3*x)/3+np.sin(4*x)/4+np.sin(5*x)/5+np.sin(6*x)/6+np.sin(7*x)/7+np.sin(8*x)/8 plt.plot(y) plt.plot(z,color='red') plt.show
 * 1) !/usr/bin/python3