1 # - * - codificación: utf-8 - * - 2 '' ' 3 Crear en 2020/04/14 4 @author: Atwood Zhang 5 ' '' 6 7 importar numpy como np 8 importar matplotlib.pyplot como plt 9 import mpl_toolkits.mplot3d 10 11 x = np.array ([1, 2, 4, 5, 6 ]) 12 y = np.array ([2, 3, 4, 5, 6 ]) 13 z = np.array ( [. 1, 2 ,. 4 ,. 5 ,. 6 ]) 14 15 AX = plt.subplot (proyección = ' 3D ' ) # crear un dibujo de ingeniería tridimensional 16ax.set_title ( ' 3d_image_show ' ) # establecer el nombre de la presente figura 17. ax.scatter (X, Y, Z, C = ' R ^ ' ) # representar los datos c: colores 'r' Red, 'y' amarillo, etc. 18 es 19. ax.set_xlabel ( ' x- ' ) # establecer el eje X 20 se ax.set_ylabel ( ' la Y ' ) # define la coordenada y del eje 21 es ax.set_zlabel ( ' z ' ) # conjunto z eje 22 es 23 es plt.show ()