Advertisement
Guest User

Wireframe plot

a guest
Apr 22nd, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. from mpl_toolkits.mplot3d import axes3d
  2. import matplotlib.pyplot as plt
  3.  
  4. fig = plt.figure()  # fig - figure, yep, logical
  5. ax = fig.add_subplot(111, projection='3d')  # three digit integer, where the first digit is the number of rows,
  6. # the second the number of columns, and the third the index of the subplot.
  7. # Projection - custom projection (rectilinear is default)
  8.  
  9. # Grab some test data.          (gotta work there, duh)
  10. X, Y, Z = axes3d.get_test_data(0.05)    # return a tuple X, Y, Z with a tested data
  11.  
  12. # Plot a basic wireframe.
  13. ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)  # rstride and cstride - step size
  14.  
  15. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement