Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
599 B
1
Indexable
Never
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import style
style.use('classic')
x = np.arange(-1, 1, 0.01)
f1 = np.sin(2*np.pi*x)
f2 = np.sin(3*np.pi*x)
f3 = np.sin(4*np.pi*x)
f4 = np.sin(5*np.pi*x)
f5 = np.sin(6*np.pi*x)
f6 = np.sin(7*np.pi*x)
f7 = np.sin(8*np.pi*x)
plt.plot(x, f1, '-', color='black')
plt.plot(x, f2, '-', color='red') 
plt.plot(x, f3, '-', color='green') 
plt.plot(x, f4, '-', color='cyan')
plt.plot(x, f5, '-', color='magenta') 
plt.plot(x, f6, '-', color='yellow') 
plt.plot(x, f7, '-', color='blue')
plt.legend(loc='best')
plt.grid(True)
plt.show()
Leave a Comment