如何在matplotlib中为3D绘图增加刻度标签和轴标签之间的空间?
我的情节以这种方式定义
import pylab
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(np.log10(NP), np.log10(NB*10**12), np.log10(NL), c='r', marker='o', lw=0)
ax.scatter(np.log10(NPd), np.log10(NBd), np.log10(NLd), c='b', marker='o', lw=0)
ax.set_xlabel('Periods', fontsize=35)
ax.set_ylabel('Magnetic', fontsize=35)
ax.set_zlabel('Luminosity', fontsize=35)
atockx = ax.xaxis.get_major_ticks()
for tockx in atockx:
tockx.label.set_fontsize(30)
atocky = ax.yaxis.get_major_ticks()
for tocky in atocky:
tocky.label.set_fontsize(30)
atockz = ax.zaxis.get_major_ticks()
for tockz in atockz:
tockz.label.set_fontsize(30)