相关疑难解决方法(0)

如何删除Axes3D类中的轴?

我正在使用mplot3d:

fig = plt.figure(figsize=(14,10))

ax = Axes3D(fig,azim=azimuth,elev=elevation)

ax.grid(on=False)

# Additional axes

xspan = np.linspace(0,80+20)
yspan = np.linspace(0,60+20)
zspan = np.linspace(0,60+20)

ax.plot3D(xspan,np.zeros(xspan.shape[0]),np.zeros(xspan.shape[0]),'k--')
ax.plot3D(np.zeros(yspan.shape[0]),yspan,np.zeros(yspan.shape[0]),'k--')
ax.plot3D(np.zeros(zspan.shape[0]),np.zeros(zspan.shape[0]),zspan,'k--')

ax.text(xspan[-1]+10, .5, .5, "x", color='red')
ax.text(.5, yspan[-1]+10, .5, "y", color='red')
ax.text(.5, .5, zspan[-1]+10, "z", color='red')

NZindices = np.nonzero(t2)[0]
#print "Nonzero values of T^2", len(NZindices), "out of", X.shape[0]

ONZ_X, ONZ_Y, ONZ_Z, ONZ_p = [],[],[],[]
INZ_X, INZ_Y, INZ_Z, INZ_p = [],[],[],[]

# Separate indices I/O
for ind in NZindices:
    if ind <= HALF_INDICES:
        INZ_X.append( X[ind] )
        INZ_Y.append( Y[ind] ) …
Run Code Online (Sandbox Code Playgroud)

python matplotlib

8
推荐指数
1
解决办法
3427
查看次数

标签 统计

matplotlib ×1

python ×1