diff options
| author | Stratis Ioannidis <stratis@Stratiss-MacBook-Air.local> | 2013-09-22 07:55:14 +0200 |
|---|---|---|
| committer | Stratis Ioannidis <stratis@Stratiss-MacBook-Air.local> | 2013-09-22 07:55:14 +0200 |
| commit | cc1eea524d8fd1314d85fe7b56cddd95fd75302d (patch) | |
| tree | 8d028b58c801d7263e2457e5cf9934e279b51e70 /plot.py | |
| parent | 1cb6e4b28e77b8c1a87e54bbd7097d7f8af0e371 (diff) | |
| parent | 50900bfc44961b87379cd2d3464b677d9f5be1ac (diff) | |
| download | recommendation-cc1eea524d8fd1314d85fe7b56cddd95fd75302d.tar.gz | |
Merge branch 'master' of ssh://74.95.195.229:1444/git/data_value
Diffstat (limited to 'plot.py')
| -rwxr-xr-x | plot.py | 36 |
1 files changed, 7 insertions, 29 deletions
@@ -1,32 +1,10 @@ -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt import numpy as np +import matplotlib.pyplot as plt +from math import e -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) - -ax = fig.add_subplot(1,1,1) -x = np.arange(0,1,0.01) -y = np.sqrt((x-1)*(x+2)/((x+1)*(x-2))) -ax.plot(x,y) - +t = np.arange(0.001, 1, 0.001) +u = np.sqrt((4*e**2 + 4*e +1)*t**2+ (24*e**2-4*e+4)*t+ 36*e**2-24*e+4)/(2*(e-1)*t)-(3*e-1)/((e-1)*t) +print u[0] +print t[0] +plt.plot(t,u) plt.show() |
