diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-07-02 22:06:37 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-07-02 22:06:37 +0200 |
commit | 491faac6191f30eab59f2f0c4a5cb2cc8cf3547f (patch) | |
tree | ac32a58f884cfa71afd9eeb74ca15352d83073ac /tabor/delavnica/py/nav.py | |
parent | eden izmed zadnjih commitov (diff) | |
download | sola-gimb-4-master.tar sola-gimb-4-master.tar.gz sola-gimb-4-master.tar.bz2 sola-gimb-4-master.tar.lz sola-gimb-4-master.tar.xz sola-gimb-4-master.tar.zst sola-gimb-4-master.zip |
Diffstat (limited to '')
-rwxr-xr-x | tabor/delavnica/py/nav.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tabor/delavnica/py/nav.py b/tabor/delavnica/py/nav.py new file mode 100755 index 0000000..b7468a9 --- /dev/null +++ b/tabor/delavnica/py/nav.py @@ -0,0 +1,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() |