summaryrefslogtreecommitdiffstats
path: root/tabor/delavnica/py/nav.py
blob: b7468a94f0fa1e73c7dfc25e7a599f11f03bba15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
sns.set()


f = 3.0
t = np.arange(0,2,0.001) 

cos_wave = np.cos(2*np.pi*f*t)
# cos_wave = 2*m.cos(2*np.pi*f*t) + 5*m.cos(2*np.pi*f*2*t)

plt.rcParams["figure.figsize"] = (12,4)
plt.plot(t,cos_wave)
plt.title("Cosine Wave with 3 Hz frequency")
plt.ylabel("Amplitude")
plt.xlabel('Time (in seconds)');

plt.show()