from numpy import linspace, cos, sin, pi
from matplotlib.pyplot import plot, show, legend

x = linspace(-4*pi, 4*pi, 200)
y1 = cos(x)
y2 = sin(x)
plot(x, y1, label='cos(x)')
plot(x, y2, label='sin(x)')
legend()

show()
