summaryrefslogtreecommitdiff
path: root/using python modules/four_plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'using python modules/four_plot.py')
-rw-r--r--using python modules/four_plot.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/using python modules/four_plot.py b/using python modules/four_plot.py
new file mode 100644
index 0000000..b158717
--- /dev/null
+++ b/using python modules/four_plot.py
@@ -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()