day1/exercise/four_plot.py
author Christopher Burns <chris.d.burns@gmail.com>
Sun, 20 Jun 2010 22:59:53 -0700
branchscipy2010
changeset 416 3ec547912b3c
parent 396 502d4d151fa2
permissions -rw-r--r--
Add whitespace to exercise code.

x = linspace(-5*pi, 5*pi, 500)
plot(x, x, 'b')
plot(x, -x, 'b')
plot(x, sin(x), 'g', linewidth=2)
plot(x, x*sin(x), 'r', linewidth=3)
legend(['x', '-x', 'sin(x)', 'xsin(x)'])
annotate('origin', xy = (0, 0))
title('Four Plot')
xlim(-5*pi, 5*pi)
ylim(-5*pi, 5*pi)
show()