Today I decided to write simple program in Python, just to practice before exam. Firstly, I wanted to draw sin and cos plot, which wasn't so hard. But then, I decided to challenge myself and draw tangent plot.
import pylab as p
x= p.arange(-1.0,1.0,0.1)
y= (p.sin(2*p.pi*x)) / (p.cos(2*p.pi*x))
p.plot(x,y,'g-',lw=1)
p.show()
It returns... ugh... this:
As you can see, it looks more like ECK plot than tangent plot. Does anyone knows what's wrong?