我需要格式化一些帮助。如何更改第二和第三图形之间的距离Matplotlib图形放置
from matplotlib.font_manager import FontProperties
import matplotlib.pyplot as plt
fig = plt.figure(1)
graph1 = fig.add_subplot(3,1,1)
graph2 = fig.add_subplot(3,1,2)
norm = fig.add_subplot(3,1,3)
graph1.set_title(TITLE + '\nscaling factor: ' +str(round(rescale,3)))
norm.set_title('Circle and Oval Height Difference')
norm.set_xlabel(XLABEL +'(Degrees)')
norm.legend(bbox_to_anchor=(1.13,1), prop={'size':8})
plt.ylabel('Heights (nm)')
graph1.legend(bbox_to_anchor=(1.13,1),prop={'size':8})
graph2.legend(bbox_to_anchor=(1.13,1),prop={'size':8})
fontP = FontProperties()
fontP.set_size('small')
x轴是否意味着相同? (如果是这样,你可以通过明确地共享它们来节省很多空间,只显示底部的x轴。) –
是的,它们是相同的,所以我该如何改变它 – user1462442