[英]how can I plot a 2d plane x axis range from 0 to 1, y axis range from 0 to 1, and z axis 0
I am trying to plot a 3d vector space like this 我想画出像3D矢量空间这
here is the code 这是代码
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.quiver(0, 0, 0, 0, 1, 0)
ax.quiver(0, 0, 0, 1, 0, 0)
ax.quiver(0, 0, 0, 0, 0, 1)
ax.quiver(0, 0, 0, 1, 1, 1)
limt = 2
ax.set_xlim([-limt, limt])
ax.set_ylim([-limt, limt])
ax.set_zlim([-limt, limt])
ax.set_xlabel('x_axis')
ax.set_ylabel('y_axis')
ax.set_zlabel('z_axis')
plt.show()
I've finished the vectors (a line with an arrow) part, how can I plot a 2d plane x axis range from 0 to 1, y axis range from 0 to 1, and z axis 0? 我已经完成了矢量(带箭头的线)部分,如何绘制二维平面x轴范围从0到1,y轴范围从0到1,z轴0?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.