Created
February 16, 2020 05:02
-
-
Save yzhong52/411f347f1536b40944578c3913a9d815 to your computer and use it in GitHub Desktop.
Beyond data scientist: 3d plots in Python with examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vertices, triangles = read_obj("teapot.obj") | |
x = vertices[:,0] | |
y = vertices[:,1] | |
z = vertices[:,2] | |
ax = plt.axes(projection='3d') | |
ax.set_xlim([-3, 3]) | |
ax.set_ylim([-3, 3]) | |
ax.set_zlim([0, 3]) | |
ax.plot_trisurf(x, z, triangles, y, shade=True, color='white') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment