surf¶
- mipylib.plotlib.miplot.surf(ax)¶
creates a three-dimensional surface plot
- Parameters
x – (array_like) Optional. X coordinate array.
y – (array_like) Optional. Y coordinate array.
z – (array_like) 2-D z value array.
cmap – (string) Color map string.
xyaxis – (boolean) Draw x and y axis or not.
zaxis – (boolean) Draw z axis or not.
grid – (boolean) Draw grid or not.
boxed – (boolean) Draw boxed or not.
mesh – (boolean) Draw mesh line or not.
- Returns
Legend
Example:
x = arange(1, 10, 0.2) y = arange(1, 20, 0.4) x, y = meshgrid(x, y) z = sin(x) + cos(y) #Plot ls = surf(x, y, z, 20) colorbar(ls,shrink=0.8) title('Surface 3D plot example')
x = linspace(-2, 2, 25) y = linspace(-2, 2, 25) x, y = meshgrid(x, y) z = x * exp(-x ** 2 - y ** 2) #Plot ls = surf(x, y, z, 20) colorbar(ls,shrink=0.8) title('Surface 3D plot example')