Added four_plot.py to exercise folder.
authorPuneeth Chaganti <punchagan@gmail.com>
Sat, 01 May 2010 16:30:45 +0530
changeset 396 502d4d151fa2
parent 395 e886e37a5032
child 397 28915381ac32
Added four_plot.py to exercise folder.
day1/exercise/four_plot.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/day1/exercise/four_plot.py	Sat May 01 16:30:45 2010 +0530
@@ -0,0 +1,11 @@
+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()