summaryrefslogtreecommitdiffstats
path: root/plot.py
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2012-02-06 16:42:23 -0800
committerThibaut Horel <thibaut.horel@gmail.com>2012-02-06 16:42:23 -0800
commitadb3db4935fcb7d2c1e26927bdb83265ad964807 (patch)
treec6a6e6918b189159173cdf8fa34c39b4286f3332 /plot.py
parent59bebc6e5458926ce04ef2d6baffd21981c9a92d (diff)
downloadrecommendation-adb3db4935fcb7d2c1e26927bdb83265ad964807.tar.gz
Some plotting tests.
Diffstat (limited to 'plot.py')
-rw-r--r--plot.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/plot.py b/plot.py
new file mode 100644
index 0000000..ae3f6fb
--- /dev/null
+++ b/plot.py
@@ -0,0 +1,28 @@
+from mpl_toolkits.mplot3d import Axes3D
+import matplotlib.pyplot as plt
+import numpy as np
+
+fig = plt.figure()
+#ax = Axes3D(fig)
+
+#X = np.arange(-20, 20, 0.5)
+#xlen = len(X)
+#Y = np.arange(-20, 20, 0.5)
+#ylen = len(Y)
+#X, Y = np.meshgrid(X, Y)
+
+#fig = plt.figure()
+#for i in [-0.3]:
+# j = i*i
+# Z = 2*X*Y*i*(4-j) + (X*X+Y*Y)*j*(6-2*j)
+# surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
+# linewidth=0, antialiased=True)
+
+ax = fig.add_subplot(1,1,1)
+x = np.arange(-1,5,0.1)
+y = (((4*x -24)*x +36)*x-16)*x
+z = 0*x
+ax.plot(x,y,x,z,antialiased=True)
+
+
+plt.show()