Skip to content

Instantly share code, notes, and snippets.

@ishankhare07
Last active February 9, 2023 13:34
Show Gist options
  • Save ishankhare07/9aba083f82a68362fc3af058398ee83e to your computer and use it in GitHub Desktop.
Save ishankhare07/9aba083f82a68362fc3af058398ee83e to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
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)');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment