采用:
import matplotlib.pyplot as pltplt.gcf().subplots_adjust(bottom=0.15)
为标签腾出空间。
编辑:
自从我给出答案以来,
matplotlib增加了
tight_layout()功能。所以我建议使用它:
plt.tight_layout()
应该为xlabel腾出空间。

采用:
import matplotlib.pyplot as pltplt.gcf().subplots_adjust(bottom=0.15)
为标签腾出空间。
编辑:
自从我给出答案以来,
matplotlib增加了
tight_layout()功能。所以我建议使用它:
plt.tight_layout()
应该为xlabel腾出空间。