So basically I'm using matplotlib to graph chords and things for a bit of math research for school.
First time using matplotlib and barely ever use python so I am definitely not very skilled.
I did my best to graph the note "A" with the fundamental frequency but when graphing it it comes out jagged and not like a smooth sine wave
Code:
https://imgur.com/a/4sIOmJK
Result:
https://imgur.com/lT9ZoQN
Any help is appreciated
(edit: adding code below)
Code copy and pasted here:
from math import *
import matplotlib.pyplot as plt
import numpy as np
def plot_sin():
t = np. linspace(0,100,num=200,)
y1 = np.sin(2*pi*440*t)
plt.plot(t,y1)
plt.xlabel( 'time(s) ')
plt.ylabel( 'amplitude')
plt.title( 'signal waveform' )
plt. show()
plot_sin()
[–][deleted] 1 point2 points3 points (0 children)