在下图中,如何操纵 z 轴标签以将其向右移动?
这是我用来创建情节的代码:
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.auto_scale_xyz([0, 100], [0, 30], [0, 1])
Z = fracStorCume[i,:,:]
surf = ax.plot_surface(X3d, Y3d, Z, cmap='autumn', cstride=2, rstride=2)
ax.set_xlabel('\n' + "Columns", linespacing=4)
ax.set_ylabel("Rows")
ax.set_zlabel("Fraction from \nstorage")
ax.set_zlim3d(0, 1) #ax.set_zlim(0, 1) #[neither of these options seem to do anything]
ax.set_yticks( np.arange(0,32,10))
ax.set_zticks(np.arange(0.05,1.01,0.25))
ax.pbaspect = [1., .33, 0.5]
ax.view_init(elev=40., azim=-65) #, azim=ii
ax.dist = 6
ax.yaxis.set_rotate_label(False)
ax.yaxis.label.set_rotation(0)
ax.zaxis.set_rotate_label(False)
ax.zaxis.label.set_rotation(0)
plt.subplots_adjust(left=0.05, right=0.80, top=.85, bottom=0.15)
plt.savefig(r'C:\tmp\3D_' + str(tstp) + '_TS_Stor.png')