summaryrefslogtreecommitdiffstats
path: root/plot.py
blob: ae3f6fb752163b55d2ce6b7f9e997765219fae5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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()