Matplotlib 三维图像 API

线图(Line plots)

Axes3D.plot(xs, ys, *args, **kwargs)
参数 描述
xs,ys 一维数组
zs z value(s), either one for all points or one for each point.
zdir Which direction to use as z (‘x’, ‘y’ or ‘z’) when plotting a 2D set.

点图(scatter)

Axes3D.scatter(xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=True, *args, **kwargs)
参数 描述
xs,ys x,y的坐标
zs Either an array of the same length as?xs?and?ys?or a single value to place all points in the same plane. Default is 0.
zdir Which direction to use as z (‘x’, ‘y’ or ‘z’) when plotting a 2D set.
s Size in points^2. It is a scalar or an array of the same length as?x?and?y.
c A color.?c?can be a single color format string, or a sequence of color specifications of length?N, or a sequence of?Nnumbers to be mapped to colors using the?cmap?and?norm?specified via kwargs (see below). Note that?c?should not be a single numeric RGB or RGBA sequence because that is indistinguishable from an array of values to be colormapped.?c?can be a 2-D array in which the rows are RGB or RGBA, however, including the case of a single row to specify the same color for all points.
depthshade Whether or not to shade the scatter markers to give the appearance of depth. Default is?True.

线框图(Wireframe)

Axes3D.plot_wireframe(X, Y, Z, *args, **kwargs)
参数 描述
X,Y,Z 二维数组
rcount, ccount int,Maximum number of samples used in each direction.
rstride, cstride int,Downsampling stride in each direction.

平面图(surface)

Axes3D.plot_surface(X, Y, Z, *args, **kwargs)
参数 描述
X, Y, Z 二维数组
rcount, ccount int,Maximum number of samples used in each direction.
rstride, cstride int,Downsampling stride in each direction.
color Color of the surface patches.
cmap Colormap of the surface patches.
facecolors Colors of each individual patch.
norm Normalization for the colormap.
vmin, vmax Bounds for the normalization.
shade Whether to shade the face colors.

Tri-Surface

Contour

Filled contour

Polygon

Bar

Quiver

参考文献:
https://matplotlib.org/tutorials/toolkits/mplot3d.html#sphx-glr-tutorials-toolkits-mplot3d-py
http://blog.csdn.net/liuxiao214/article/details/78975792

你可能感兴趣的:(matplotlib,作图)