如何删除matplotlib 3d打印中的轴值?随机绘图:
import numpy as np
import matplotlib.pyplot as plt
ax = plt.axes(projection='3d')
a = .6
b = 1.2
zline = np.linspace(0, 15, 1000)
xline = zline*.6
yline = zline*1.2
ax.plot3D(xline, yline, zline, 'gray')
zdata = 15 * np.random.random(100)
xdata = zdata*.6 + 2 * np.random.randn(100)
ydata = zdata*1.2 + 1 * np.random.randn(100)
ax.scatter3D(xdata, ydata, zdata, c='red')
w = (1.0, 1.0, 1.0, 1.0)
ax.w_xaxis.set_pane_color(w)
ax.w_yaxis.set_pane_color(w)
ax.w_zaxis.set_pane_color(w)
plt.show()
如果我使用
ax.set_xticks([])
对于我得到的所有轴
我仍然希望在绘图中保留线,只删除轴值。