我需要格式化一些幫助。如何更改第二和第三圖形之間的距離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