答案 0 :(得分:1)
您可以直接定位并给出刻度标签。如果您的尺寸不足,请考虑自己设置刻度(对齐,位置,名称,字体大小等)。以下示例对Y轴刻度标签执行此操作:
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(10,10))
ax = fig.gca(projection='3d')
x,y,z = np.random.randint(0,100,30),np.random.randint(0,100,30),np.random.randint(0,100,30)
ax.scatter(x,y,z)
ax.set_xlabel('X')
ax.set_xlim3d(0, 100)
ax.set_ylabel('Y')
ax.set_ylim3d(0, 100)
ax.set_yticks([30,60,90])
ax.set_yticklabels(['number 30','number 60','number 90'], va='center', ha='left',fontsize=24)
ax.set_zlabel('Z')
ax.set_zlim3d(0, 100)
plt.show()
,这导致:
显然,您需要查看所需图形尺寸的效果以及您希望在图中显示的值。