python - Putting 2D coordinate system to 3D via matplotlib -
i pretty new programing in python , have question. want draw 2d coordinate space in 3d add points in space , show rotations around (0,0) (2,1) of 2d space 90°,120° , 60°. problem don't know how draw 2d coordinate space in 3. can suggest me solution how place 2d in 3d using matplotlib?
here example of code i've made far...
from mpl_toolkits.mplot3d import axes3d import numpy np import matplotlib.pyplot plt fig = plt.figure() ax = fig.add_subplot(111,projection='3d') x = 2 y= 1 ax.scatter(x, y, 0, zdir='y') #size of 3d ax.legend() ax.set_xlim3d(0, 10) ax.set_ylim3d(0, 10) ax.set_zlim3d(0, 10) plt.show()
you might want @ examples found on mplot3d tutorial
http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html#tri-surface-plots
Comments
Post a Comment